Sha256: da4cc8b2c4240bc32267c28cde175faa3bf2bdd1ae86b4658b4b528d9090482d

Contents?: true

Size: 656 Bytes

Versions: 50

Compression:

Stored size: 656 Bytes

Contents

require 'resque'

module Rollbar
  module Delay
    class Resque
      def self.call(payload)
        new.call(payload)
      end

      def call(payload)
        ::Resque.enqueue(Job, payload)
      end

      class Job
        class << self
          attr_accessor :queue
        end

        self.queue = :default

        def self.perform(payload)
          new.perform(payload)
        end

        def perform(payload)
          begin
            Rollbar.process_from_async_handler(payload)
          rescue
            # Raise the exception so Resque can track the errored job
            raise
          end
        end
      end
    end
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
rollbar-2.19.2 lib/rollbar/delay/resque.rb
rollbar-2.19.1 lib/rollbar/delay/resque.rb
rollbar-2.19.0 lib/rollbar/delay/resque.rb
rollbar-2.18.2 lib/rollbar/delay/resque.rb
rollbar-2.18.0 lib/rollbar/delay/resque.rb
rollbar-2.17.0 lib/rollbar/delay/resque.rb
rollbar-2.16.4 lib/rollbar/delay/resque.rb
rollbar-2.16.3 lib/rollbar/delay/resque.rb
rollbar-2.16.2 lib/rollbar/delay/resque.rb
rollbar-2.16.0 lib/rollbar/delay/resque.rb
rollbar-2.15.6 lib/rollbar/delay/resque.rb
rollbar-2.15.5 lib/rollbar/delay/resque.rb
rollbar-2.15.4 lib/rollbar/delay/resque.rb
rollbar-2.15.3 lib/rollbar/delay/resque.rb
rollbar-2.15.2 lib/rollbar/delay/resque.rb
rollbar-2.15.1 lib/rollbar/delay/resque.rb
rollbar-2.15.0 lib/rollbar/delay/resque.rb
rollbar-2.14.1 lib/rollbar/delay/resque.rb
rollbar-2.14.0 lib/rollbar/delay/resque.rb
rollbar-2.13.3 lib/rollbar/delay/resque.rb