Class: ParallelWorkforce::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/parallel_workforce/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/parallel_workforce/configuration.rb', line 16

def initialize
  @job_class = defined?(ActiveJob) && ParallelWorkforce::Job::ActiveJob
  @logger = defined?(Rails) && Rails.logger
  @revision_builder = ParallelWorkforce::RevisionBuilder::FilesHash.new
  @serial_mode_checker = nil
  @serializer = ParallelWorkforce::Serializer::JsonMarshal.new
  @redis_connector = ParallelWorkforce::RedisConnector::RedisPool.new
  @job_timeout = 10
  @job_key_expiration = 20
  @production_environment = defined?(Rails) ? Rails.env.production? : true
  @allow_nested_parallelization = false
end

Instance Attribute Details

#job_classObject

Returns the value of attribute job_class.



3
4
5
# File 'lib/parallel_workforce/configuration.rb', line 3

def job_class
  @job_class
end

#job_key_expirationObject

Returns the value of attribute job_key_expiration.



3
4
5
# File 'lib/parallel_workforce/configuration.rb', line 3

def job_key_expiration
  @job_key_expiration
end

#job_timeoutObject

Returns the value of attribute job_timeout.



3
4
5
# File 'lib/parallel_workforce/configuration.rb', line 3

def job_timeout
  @job_timeout
end

#loggerObject

Returns the value of attribute logger.



3
4
5
# File 'lib/parallel_workforce/configuration.rb', line 3

def logger
  @logger
end

#production_environmentObject

Returns the value of attribute production_environment.



3
4
5
# File 'lib/parallel_workforce/configuration.rb', line 3

def production_environment
  @production_environment
end

#redis_connectorObject

Returns the value of attribute redis_connector.



3
4
5
# File 'lib/parallel_workforce/configuration.rb', line 3

def redis_connector
  @redis_connector
end

#revision_builderObject

Returns the value of attribute revision_builder.



3
4
5
# File 'lib/parallel_workforce/configuration.rb', line 3

def revision_builder
  @revision_builder
end

#serial_mode_checkerObject

Returns the value of attribute serial_mode_checker.



3
4
5
# File 'lib/parallel_workforce/configuration.rb', line 3

def serial_mode_checker
  @serial_mode_checker
end

#serializerObject

Returns the value of attribute serializer.



3
4
5
# File 'lib/parallel_workforce/configuration.rb', line 3

def serializer
  @serializer
end