def start(self, command_line):
log.debug("LongRunningCommand run_command: {0}".format(command_line))
elem = yield self._sender.send_request('create')
self._shell_id = _find_shell_id(elem)
command_line_elem = _build_command_line_elem(command_line)
log.debug('LongRunningCommand run_command: sending command request '
'(shell_id={0}, command_line_elem={1})'.format(
self._shell_id, command_line_elem))
try:
command_elem = yield self._sender.send_request(
'command', shell_id=self._shell_id,
command_line_elem=command_line_elem,
timeout=self._sender._sender._conn_info.timeout)
except TimeoutError:
yield self._sender.close_connections()
raise
self._command_id = _find_command_id(command_elem)
评论列表
文章目录