Class: Rekiq::Configuration
- Inherits:
-
Object
- Object
- Rekiq::Configuration
- Includes:
- Validator
- Defined in:
- lib/rekiq/configuration.rb
Constant Summary
Constants included from Validator
Instance Attribute Summary collapse
-
#schedule_expired ⇒ Object
Returns the value of attribute schedule_expired.
-
#schedule_post_work ⇒ Object
Returns the value of attribute schedule_post_work.
-
#work_time_shift ⇒ Object
Returns the value of attribute work_time_shift.
-
#work_time_tolerance ⇒ Object
Returns the value of attribute work_time_tolerance.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Methods included from Validator
included, #validate!, #validate_bool!, #validate_numeric!, #validate_schedule!
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/rekiq/configuration.rb', line 15 def initialize # indicates if next work is scheduled after or before the worker completes # this is relevant when we want to guarantee that workers do not run in paralel # type bool, default false @schedule_post_work = false # indicates a shift, in seconds, to apply to event time returned from schedule # to calculate the work_time # type int, default 0 @work_time_shift = 0 # indicates the tolerance, in seconds, for work_time relative to current time # type int (value greater than or equal to 0), default 0 @work_time_tolerance = 0 # indicates if expired work_times are to be scheduled # a work_time is considered expired when it's before current time minus # work_time_tolerance # type bool, default false @schedule_expired = false end |
Instance Attribute Details
#schedule_expired ⇒ Object
Returns the value of attribute schedule_expired.
7 8 9 |
# File 'lib/rekiq/configuration.rb', line 7 def schedule_expired @schedule_expired end |
#schedule_post_work ⇒ Object
Returns the value of attribute schedule_post_work.
7 8 9 |
# File 'lib/rekiq/configuration.rb', line 7 def schedule_post_work @schedule_post_work end |
#work_time_shift ⇒ Object
Returns the value of attribute work_time_shift.
7 8 9 |
# File 'lib/rekiq/configuration.rb', line 7 def work_time_shift @work_time_shift end |
#work_time_tolerance ⇒ Object
Returns the value of attribute work_time_tolerance.
7 8 9 |
# File 'lib/rekiq/configuration.rb', line 7 def work_time_tolerance @work_time_tolerance end |