Class: ChainedJob::Config
- Inherits:
-
Object
- Object
- ChainedJob::Config
- Defined in:
- lib/chained_job/config.rb
Constant Summary collapse
- DEFAULT_ARGUMENTS_BATCH_SIZE =
1_000
- DEFAULT_ARGUMENTS_QUEUE_EXPIRATION =
7 days
7 * 24 * 60 * 60
Instance Attribute Summary collapse
-
#after_worker_finished ⇒ Object
Returns the value of attribute after_worker_finished.
-
#arguments_batch_size ⇒ Object
Returns the value of attribute arguments_batch_size.
-
#arguments_queue_expiration ⇒ Object
Returns the value of attribute arguments_queue_expiration.
-
#around_array_of_job_arguments ⇒ Object
Returns the value of attribute around_array_of_job_arguments.
-
#around_chain_process ⇒ Object
Returns the value of attribute around_chain_process.
-
#around_start_chains ⇒ Object
Returns the value of attribute around_start_chains.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#redis ⇒ Object
Returns the value of attribute redis.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/chained_job/config.rb', line 23 def initialize self.arguments_batch_size = DEFAULT_ARGUMENTS_BATCH_SIZE self.arguments_queue_expiration = DEFAULT_ARGUMENTS_QUEUE_EXPIRATION self.logger = ::Logger.new(STDOUT) self.around_start_chains = ->(, &block) { block.call } self.around_chain_process = ->(, &block) { block.call } self.around_array_of_job_arguments = ->(, &block) { block.call } self.after_worker_finished = ->() {} self.debug = true end |
Instance Attribute Details
#after_worker_finished ⇒ Object
Returns the value of attribute after_worker_finished.
10 11 12 |
# File 'lib/chained_job/config.rb', line 10 def after_worker_finished @after_worker_finished end |
#arguments_batch_size ⇒ Object
Returns the value of attribute arguments_batch_size.
10 11 12 |
# File 'lib/chained_job/config.rb', line 10 def arguments_batch_size @arguments_batch_size end |
#arguments_queue_expiration ⇒ Object
Returns the value of attribute arguments_queue_expiration.
10 11 12 |
# File 'lib/chained_job/config.rb', line 10 def arguments_queue_expiration @arguments_queue_expiration end |
#around_array_of_job_arguments ⇒ Object
Returns the value of attribute around_array_of_job_arguments.
10 11 12 |
# File 'lib/chained_job/config.rb', line 10 def around_array_of_job_arguments @around_array_of_job_arguments end |
#around_chain_process ⇒ Object
Returns the value of attribute around_chain_process.
10 11 12 |
# File 'lib/chained_job/config.rb', line 10 def around_chain_process @around_chain_process end |
#around_start_chains ⇒ Object
Returns the value of attribute around_start_chains.
10 11 12 |
# File 'lib/chained_job/config.rb', line 10 def around_start_chains @around_start_chains end |
#debug ⇒ Object
Returns the value of attribute debug.
10 11 12 |
# File 'lib/chained_job/config.rb', line 10 def debug @debug end |
#logger ⇒ Object
Returns the value of attribute logger.
10 11 12 |
# File 'lib/chained_job/config.rb', line 10 def logger @logger end |
#redis ⇒ Object
Returns the value of attribute redis.
10 11 12 |
# File 'lib/chained_job/config.rb', line 10 def redis @redis end |