Class: Rollbar::Delay::GirlFriday
- Inherits:
-
Object
- Object
- Rollbar::Delay::GirlFriday
- Defined in:
- lib/rollbar/delay/girl_friday.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.call(payload) ⇒ Object
9 10 11 |
# File 'lib/rollbar/delay/girl_friday.rb', line 9 def call(payload) new.call(payload) end |
.queue ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/rollbar/delay/girl_friday.rb', line 13 def queue @queue ||= queue_class.new(nil, :size => 5) do |payload| Rollbar.process_from_async_handler(payload) # Do not rescue. GirlFriday will call the error handler. end end |
.queue_class ⇒ Object
5 6 7 |
# File 'lib/rollbar/delay/girl_friday.rb', line 5 def queue_class ::GirlFriday::WorkQueue end |
Instance Method Details
#call(payload) ⇒ Object
22 23 24 |
# File 'lib/rollbar/delay/girl_friday.rb', line 22 def call(payload) self.class.queue.push(payload) end |