Module: Resque::Plugins::RetryOnLock

Includes:
Locked, Retried
Defined in:
lib/resque/plugins/retry_on_lock.rb

Overview

If you want your job to retry when a lock is encountered, just extend this module.

Instance Method Summary collapse

Methods included from Retried

#args_for_try_again, #seconds_until_retry, #try_again

Methods included from Locked

#around_perform_lock, #lock, #lock_time, #locked?

Instance Method Details

#on_lock(*args) ⇒ Object

Use Locked’s lock hook.



11
12
13
# File 'lib/resque/plugins/retry_on_lock.rb', line 11

def on_lock(*args)
  try_again(*args)
end