class Wamp::Worker::Proxy::Base
Attributes
name[R]
queue[R]
ticker[R]
uuid[R]
Public Class Methods
new(name, uuid: nil)
click to toggle source
Constructor
@param name [Symbol] - The name of the connection @param uuid [String] - The uuid for the proxy. This can be passed in as
well to allow it to be initialized for hte entire worker
# File lib/wamp/worker/proxy/base.rb, line 17 def initialize(name, uuid: nil) @name = name @queue = Wamp::Worker::Queue.new(name) @ticker = Wamp::Worker::Ticker.new(name) @uuid = uuid || ENV['DYNO'] || SecureRandom.hex(12) end
Public Instance Methods
background_res_queue()
click to toggle source
Returns the response queue name for the backgrounder
@return [String] - The key for the worker
# File lib/wamp/worker/proxy/base.rb, line 77 def background_res_queue "wamp:#{self.name}:background:#{self.uuid}" end
command_req_queue()
click to toggle source
Returns the commands queue key for the worker
@return [String] - The key for the commands list
# File lib/wamp/worker/proxy/base.rb, line 46 def command_req_queue "wamp:#{self.name}:command" end
unique_command_resp_queue()
click to toggle source
Returns a new handle
@return [String] - The key for the new handle
# File lib/wamp/worker/proxy/base.rb, line 53 def unique_command_resp_queue "wamp:#{self.name}:response:#{SecureRandom.hex(12)}" end