Class: ParallelWorkforce::Configuration
- Inherits:
-
Object
- Object
- ParallelWorkforce::Configuration
- Defined in:
- lib/parallel_workforce/configuration.rb
Instance Attribute Summary collapse
-
#job_class ⇒ Object
Returns the value of attribute job_class.
-
#job_key_expiration ⇒ Object
Returns the value of attribute job_key_expiration.
-
#job_timeout ⇒ Object
Returns the value of attribute job_timeout.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#production_environment ⇒ Object
Returns the value of attribute production_environment.
-
#redis_connector ⇒ Object
Returns the value of attribute redis_connector.
-
#revision_builder ⇒ Object
Returns the value of attribute revision_builder.
-
#serial_mode_checker ⇒ Object
Returns the value of attribute serial_mode_checker.
-
#serializer ⇒ Object
Returns the value of attribute serializer.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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_class ⇒ Object
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_expiration ⇒ Object
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_timeout ⇒ Object
Returns the value of attribute job_timeout.
3 4 5 |
# File 'lib/parallel_workforce/configuration.rb', line 3 def job_timeout @job_timeout end |
#logger ⇒ Object
Returns the value of attribute logger.
3 4 5 |
# File 'lib/parallel_workforce/configuration.rb', line 3 def logger @logger end |
#production_environment ⇒ Object
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_connector ⇒ Object
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_builder ⇒ Object
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_checker ⇒ Object
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 |
#serializer ⇒ Object
Returns the value of attribute serializer.
3 4 5 |
# File 'lib/parallel_workforce/configuration.rb', line 3 def serializer @serializer end |