Class: Celerbrake::Shoryuken::ErrorHandler
- Inherits:
-
Object
- Object
- Celerbrake::Shoryuken::ErrorHandler
- Defined in:
- lib/celerbrake/shoryuken.rb
Overview
Provides integration with Shoryuken.
Instance Method Summary collapse
-
#call(worker, queue, _sqs_msg, body, &block) ⇒ Object
rubocop:disable Lint/RescueException.
Instance Method Details
#call(worker, queue, _sqs_msg, body, &block) ⇒ Object
rubocop:disable Lint/RescueException
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/celerbrake/shoryuken.rb', line 8 def call(worker, queue, _sqs_msg, body, &block) timing = Celerbrake::Benchmark.measure(&block) rescue Exception => exception notify_celerbrake(exception, worker, queue, body) Celerbrake.notify_queue( queue: worker.class.to_s, error_count: 1, timing: 0.01, ) raise exception else Celerbrake.notify_queue( queue: worker.class.to_s, error_count: 0, timing: timing, ) end |