class AllQ::Touch
Public Instance Methods
base_send(job_id)
click to toggle source
# File lib/allq/actions/touch.rb, line 18 def base_send(job_id) { 'action' => 'touch', 'params' => { 'job_id' => job_id } } end
rcv(data)
click to toggle source
# File lib/allq/actions/touch.rb, line 13 def rcv(data) return nil if data.to_s == '' || data.to_s.strip == '{}' JSON.parse(data) end
snd(data)
click to toggle source
# File lib/allq/actions/touch.rb, line 4 def snd(data) job_id = data[:job_id] send_data = base_send(job_id) response = send_hash_as_json(send_data, true) result = rcv(response) return result["touch"] && result["touch"]["job_id"] end