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.7.1 lib/rollbar/delay/girl_friday.rb
rollbar-2.7.0 lib/rollbar/delay/girl_friday.rb
rollbar-2.6.3 lib/rollbar/delay/girl_friday.rb
rollbar-2.6.2 lib/rollbar/delay/girl_friday.rb
rollbar-2.6.1 lib/rollbar/delay/girl_friday.rb
rollbar-2.6.0 lib/rollbar/delay/girl_friday.rb
rollbar-2.5.2 lib/rollbar/delay/girl_friday.rb
rollbar-2.5.1 lib/rollbar/delay/girl_friday.rb
rollbar-2.5.0 lib/rollbar/delay/girl_friday.rb
rollbar-2.4.0 lib/rollbar/delay/girl_friday.rb
rollbar-2.3.0 lib/rollbar/delay/girl_friday.rb
rollbar-2.2.1 lib/rollbar/delay/girl_friday.rb
rollbar-2.2.0 lib/rollbar/delay/girl_friday.rb