Class: CanvasSync::JobUniqueness::Strategy::WhileExecuting
- Defined in:
- lib/canvas_sync/job_uniqueness/strategy/while_executing.rb
Constant Summary collapse
- RUN_SUFFIX =
":RUN"
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#batch_callback, #initialize, locks_on
Constructor Details
This class inherits a constructor from CanvasSync::JobUniqueness::Strategy::Base
Instance Method Details
#on_enqueue ⇒ Object
8 9 10 11 12 |
# File 'lib/canvas_sync/job_uniqueness/strategy/while_executing.rb', line 8 def on_enqueue wrap_in_batch do yield end end |
#on_perform ⇒ Object
14 15 16 17 |
# File 'lib/canvas_sync/job_uniqueness/strategy/while_executing.rb', line 14 def on_perform lock!(:perform) yield end |