Sha256: 03912eca52886ca981b2f7962ab9cf488c03ed2b1cc387571baf4a8a8ae4b474
Contents?: true
Size: 838 Bytes
Versions: 44
Compression:
Stored size: 838 Bytes
Contents
module Resque module Failure # Provides Resque integration with Airbrake. # # @since v5.0.0 # @see https://github.com/resque/resque/wiki/Failure-Backends class Airbrake < Base def save ::Airbrake.notify_sync(exception, payload) do |notice| notice[:context][:component] = 'resque' notice[:context][:action] = action(payload) end end private # @return [String] job's name. When ActiveJob is present, retrieve # job_class. When used directly, use worker's name def action(payload) active_job_args = payload['args'].first if payload['args'] if active_job_args.is_a?(Hash) && active_job_args['job_class'] active_job_args['job_class'] else payload['class'].to_s end end end end end
Version data entries
44 entries across 44 versions & 1 rubygems