Class: Rollbar::Delay::Shoryuken

Inherits:
Object
  • Object
show all
Includes:
Shoryuken::Worker
Defined in:
lib/rollbar/delay/shoryuken.rb

Overview

Following class allows to send rollbars using Sho-ryu-ken as a background jobs processor. See the queue_name method which states that your queues needs to be names as “rollbar_ENVIRONMENT”. Retry intervals will be used to retry sending the same message again if failed before.

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.queueObject

Returns the value of attribute queue.



13
14
15
# File 'lib/rollbar/delay/shoryuken.rb', line 13

def queue
  @queue
end

Class Method Details

.call(payload) ⇒ Object



18
19
20
# File 'lib/rollbar/delay/shoryuken.rb', line 18

def self.call(payload)
  new.call(payload, :queue => queue)
end

Instance Method Details

#call(payload, options = {}) ⇒ Object



22
23
24
# File 'lib/rollbar/delay/shoryuken.rb', line 22

def call(payload, options = {})
  self.class.perform_async(payload, options)
end

#perform(_sqs_message, payload) ⇒ Object



31
32
33
# File 'lib/rollbar/delay/shoryuken.rb', line 31

def perform(_sqs_message, payload)
  Rollbar.process_from_async_handler(payload)
end