Class: CanvasSync::JobUniqueness::Strategy::UntilExpired

Inherits:
UntilExecuted show all
Defined in:
lib/canvas_sync/job_uniqueness/strategy/until_expired.rb

Instance Attribute Summary

Attributes inherited from Base

#lock_context

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_enqueueObject



6
7
8
9
# File 'lib/canvas_sync/job_uniqueness/strategy/until_expired.rb', line 6

def on_enqueue
  lock!(:enqueue)
  yield
end

#on_performObject



11
12
13
# File 'lib/canvas_sync/job_uniqueness/strategy/until_expired.rb', line 11

def on_perform
  lock!(:perform)
end