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 Method Summary collapse

Instance Method Summary collapse

Class Method Details

.queue_nameObject



11
12
13
# File 'lib/rollbar/delay/shoryuken.rb', line 11

def self.queue_name
  "rollbar_#{Rollbar.configuration.environment}"
end

Instance Method Details

#call(payload) ⇒ Object

to push the job !



24
25
26
# File 'lib/rollbar/delay/shoryuken.rb', line 24

def call(payload)
  self.class.perform_async(payload)
end

#perform(_sqs_message, payload) ⇒ Object

responsible for performing job. - payload is a json parsed body of the message.



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

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