Sha256: 6f051f2306a5b65662de225b50b61e62d1a9058e05ad190db30fa1ff461c9e33
Contents?: true
Size: 481 Bytes
Versions: 33
Compression:
Stored size: 481 Bytes
Contents
namespace :message_handler do desc "Start the message bus receiver" task :receive => :environment do raise "HANDLER_KLASS must be set" unless ENV['HANDLER_KLASS'] raise "QUEUE_NAME must be set" unless ENV['QUEUE_NAME'] handler_klass = ENV['HANDLER_KLASS'].constantize queue_name = "#{ENV['QUEUE_NAME']}_#{Rails.env}" routing_key = ENV['ROUTING_KEY'] || "#.#" Pwwka::Receiver.subscribe(handler_klass, queue_name, routing_key: routing_key) end end
Version data entries
33 entries across 33 versions & 1 rubygems