Module: Resque::Plugins::JobChain

Defined in:
lib/resque/plugins/job_chain.rb

Instance Method Summary collapse

Instance Method Details

#after_perform_job_chain(*args) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/resque/plugins/job_chain.rb', line 4

def after_perform_job_chain(*args)
  chain_id, step_index = extract_chain_meta(args)
  return unless chain_id

  executor = Resque::JobChain::Executor.new(chain_id, step_index)
  executor.after_step
end

#on_failure_job_chain(exception, *args) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/resque/plugins/job_chain.rb', line 12

def on_failure_job_chain(exception, *args)
  chain_id, step_index = extract_chain_meta(args)
  return unless chain_id

  executor = Resque::JobChain::Executor.new(chain_id, step_index)
  executor.on_failure(exception)
end