Sha256: d3345fdb3e0b3392eb003c7493cb8b23993defe03f9613a32cf16a112109cb1e

Contents?: true

Size: 718 Bytes

Versions: 33

Compression:

Stored size: 718 Bytes

Contents

module Rollbar
  module Delay
    class GirlFriday

      class << self
        def queue_class
          ::GirlFriday::WorkQueue
        end

        def call(payload)
          new.call(payload)
        end

        def queue
          @queue ||= self.queue_class.new(nil, :size => 5) do |payload|
            begin
              Rollbar.process_from_async_handler(payload)
            rescue
              # According to https://github.com/mperham/girl_friday/wiki#error-handling
              # we reraise the exception so it can be handled some way
              raise
            end
          end
        end
      end

      def call(payload)
        self.class.queue.push(payload)
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
rollbar-2.14.1 lib/rollbar/delay/girl_friday.rb
rollbar-2.14.0 lib/rollbar/delay/girl_friday.rb
rollbar-2.13.3 lib/rollbar/delay/girl_friday.rb
rollbar-2.13.2 lib/rollbar/delay/girl_friday.rb
rollbar-2.13.1 lib/rollbar/delay/girl_friday.rb
rollbar-2.13.0 lib/rollbar/delay/girl_friday.rb
rollbar-2.12.0 lib/rollbar/delay/girl_friday.rb
rollbar-2.11.5 lib/rollbar/delay/girl_friday.rb
rollbar-2.11.4 lib/rollbar/delay/girl_friday.rb
rollbar-2.11.3 lib/rollbar/delay/girl_friday.rb
rollbar-2.11.2 lib/rollbar/delay/girl_friday.rb
rollbar-2.11.1 lib/rollbar/delay/girl_friday.rb
rollbar-2.11.0 lib/rollbar/delay/girl_friday.rb
rollbar-2.10.0 lib/rollbar/delay/girl_friday.rb
rollbar-2.9.1 lib/rollbar/delay/girl_friday.rb
rollbar-2.9.0 lib/rollbar/delay/girl_friday.rb
rollbar-2.8.3 lib/rollbar/delay/girl_friday.rb
rollbar-2.8.2 lib/rollbar/delay/girl_friday.rb
rollbar-2.8.1 lib/rollbar/delay/girl_friday.rb
rollbar-2.8.0 lib/rollbar/delay/girl_friday.rb