Method: Tochka::Agent#start_capture

Defined in:
lib/tochka/agent.rb

#start_captureObject



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/tochka/agent.rb', line 46

def start_capture
  $log.info("requesting start_capture")
  resp = do_rpc(get_msg(CMD_START_CAPTURE))
  resp = get_status()
  if resp["state"] == STATE_RUNNING
    update_state(resp)
    return true
  end

  # not responded or failed
  @state = STATE_UNKNOWN
  return false
rescue => e
  $log.err("agent detected unknown error in start_capture (#{e})")
  return false
end