Class: Cloudtasker::UniqueJob::ConflictStrategy::BaseStrategy
- Inherits:
-
Object
- Object
- Cloudtasker::UniqueJob::ConflictStrategy::BaseStrategy
- Defined in:
- lib/cloudtasker/unique_job/conflict_strategy/base_strategy.rb
Overview
Base behaviour for conflict strategies
Direct Known Subclasses
Instance Attribute Summary collapse
-
#job ⇒ Object
readonly
Returns the value of attribute job.
Instance Method Summary collapse
-
#initialize(job) ⇒ BaseStrategy
constructor
Build a new instance of the class.
-
#on_execute ⇒ Object
Handling logic to perform when a conflict occurs while executing a job.
-
#on_schedule ⇒ Object
Handling logic to perform when a conflict occurs while scheduling a job.
Constructor Details
#initialize(job) ⇒ BaseStrategy
Build a new instance of the class.
15 16 17 |
# File 'lib/cloudtasker/unique_job/conflict_strategy/base_strategy.rb', line 15 def initialize(job) @job = job end |
Instance Attribute Details
#job ⇒ Object (readonly)
Returns the value of attribute job.
8 9 10 |
# File 'lib/cloudtasker/unique_job/conflict_strategy/base_strategy.rb', line 8 def job @job end |
Instance Method Details
#on_execute ⇒ Object
Handling logic to perform when a conflict occurs while executing a job.
31 32 33 |
# File 'lib/cloudtasker/unique_job/conflict_strategy/base_strategy.rb', line 31 def on_execute true end |
#on_schedule ⇒ Object
Handling logic to perform when a conflict occurs while scheduling a job.
23 24 25 |
# File 'lib/cloudtasker/unique_job/conflict_strategy/base_strategy.rb', line 23 def on_schedule true end |