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

Version Path
pwwka-0.14.0 lib/pwwka/tasks.rb
pwwka-0.13.3 lib/pwwka/tasks.rb
pwwka-0.13.2 lib/pwwka/tasks.rb
pwwka-0.13.1 lib/pwwka/tasks.rb
pwwka-0.13.0 lib/pwwka/tasks.rb
pwwka-0.13.0.RC2 lib/pwwka/tasks.rb
pwwka-0.13.0.RC1 lib/pwwka/tasks.rb
pwwka-0.12.0 lib/pwwka/tasks.rb
pwwka-0.12.0.RC2 lib/pwwka/tasks.rb
pwwka-0.12.0.RC1 lib/pwwka/tasks.rb
pwwka-0.11.0 lib/pwwka/tasks.rb
pwwka-0.11.0.RC1 lib/pwwka/tasks.rb
pwwka-0.10.0 lib/pwwka/tasks.rb
pwwka-0.10.0.RC lib/pwwka/tasks.rb
pwwka-0.9.0 lib/pwwka/tasks.rb
pwwka-0.9.0.RC1 lib/pwwka/tasks.rb
pwwka-0.8.0 lib/pwwka/tasks.rb
pwwka-0.8.0.RC1 lib/pwwka/tasks.rb
pwwka-0.7.0.RC1 lib/pwwka/tasks.rb
pwwka-0.7.0 lib/pwwka/tasks.rb