Class: Messaging::SidekiqWorker

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Worker
Defined in:
lib/messaging/sidekiq_worker.rb

Instance Method Summary collapse

Instance Method Details

#perform(raw_message, handler_name) ⇒ Object



6
7
8
9
10
# File 'lib/messaging/sidekiq_worker.rb', line 6

def perform(raw_message, handler_name)
  message = Messaging::Message::FromJson.(raw_message)
  handler = handler_name.constantize
  handler.call message
end