Sha256: 05b140d419142647e90e8b6a0db030d4f9a585b2f87dad941de0ac0d5aadc991
Contents?: true
Size: 882 Bytes
Versions: 14
Compression:
Stored size: 882 Bytes
Contents
module QueueBus # queue'd in each class Rider class << self def perform(attributes = {}) sub_key = attributes["bus_rider_sub_key"] app_key = attributes["bus_rider_app_key"] raise "No application key passed" if app_key.to_s == "" raise "No subcription key passed" if sub_key.to_s == "" attributes ||= {} ::QueueBus.log_worker("Rider received: #{app_key} #{sub_key} #{attributes.inspect}") # attributes that should be available # attributes["bus_event_type"] # attributes["bus_app_key"] # attributes["bus_published_at"] # attributes["bus_driven_at"] # (now running with the real app that subscribed) ::QueueBus.dispatcher_execute(app_key, sub_key, attributes.merge("bus_executed_at" => Time.now.to_i)) end end end end
Version data entries
14 entries across 14 versions & 1 rubygems