class AllQ::Throttle
Public Instance Methods
base_send(name, tps)
click to toggle source
# File lib/allq/actions/throttle.rb, line 13 def base_send(name, tps) { 'action' => 'throttle', 'params' => { 'tube' => name, 'tps' => tps } } end
snd(data)
click to toggle source
# File lib/allq/actions/throttle.rb, line 4 def snd(data) name = data[:name] tps = data[:tps].to_i || 10 send_data = base_send(name, tps) response = send_hash_as_json(send_data, true) rcv(response) end