Class: Sidekiq::Job::InterruptHandler
- Inherits:
-
Object
- Object
- Sidekiq::Job::InterruptHandler
show all
- Includes:
- ServerMiddleware
- Defined in:
- lib/sidekiq/job/interrupt_handler.rb
Instance Attribute Summary
#config
Instance Method Summary
collapse
#logger, #redis, #redis_pool
Instance Method Details
#call(instance, hash, queue) ⇒ Object
8
9
10
11
12
13
14
15
|
# File 'lib/sidekiq/job/interrupt_handler.rb', line 8
def call(instance, hash, queue)
yield
rescue Interrupted
logger.debug "Interrupted, re-queueing..."
c = Sidekiq::Client.new
c.push(hash)
raise Sidekiq::JobRetry::Skip
end
|