Sha256: 6c4b94477a8d6d38ca4af83d71e0ca39dff3381701742ba445a0a01425f4b699

Contents?: true

Size: 586 Bytes

Versions: 1

Compression:

Stored size: 586 Bytes

Contents

module AppfluxRuby
  module Sidekiq
    class ErrorHandler
      def call(_worker, context, _queue)
        yield
      rescue Exception => exception
        ::AppfluxRuby::Bugflux.initialize_additional_data
          params = {
            component: 'sidekiq',
            args: context['args'],
            queue: context['queue'],
            message: context['error_message'],
            options: context.except('args', 'queue', 'error_message')
          }

          ::AppfluxRuby::BugfluxNotifier.notify(exception, params)
          raise exception
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
appflux_ruby-0.1.2 lib/appflux_ruby/sidekiq/error_handler.rb