Module: CanvasSync::JobUniqueness::Strategy

Extended by:
ActiveSupport::Autoload
Defined in:
lib/canvas_sync/job_uniqueness/strategy.rb,
lib/canvas_sync/job_uniqueness/strategy/base.rb,
lib/canvas_sync/job_uniqueness/strategy/until_expired.rb,
lib/canvas_sync/job_uniqueness/strategy/until_executed.rb,
lib/canvas_sync/job_uniqueness/strategy/until_executing.rb,
lib/canvas_sync/job_uniqueness/strategy/while_executing.rb,
lib/canvas_sync/job_uniqueness/strategy/until_and_while_executing.rb

Defined Under Namespace

Classes: Base, UntilAndWhileExecuting, UntilExecuted, UntilExecuting, UntilExpired, WhileExecuting

Class Method Summary collapse

Class Method Details

.lookup(strategy) ⇒ Object



14
15
16
17
18
# File 'lib/canvas_sync/job_uniqueness/strategy.rb', line 14

def lookup(strategy)
  matching_strategy(strategy.to_s.camelize) ||
    CanvasSync::JobUniqueness.config.lock_strategies[strategy] ||
    raise(ArgumentError, "strategy: #{strategy} is not found. Is it declared in the configuration?")
end