MCPcopy Index your code
hub / github.com/Tencent/CodeAnalysis / _check_task_done

Method _check_task_done

client/node/common/task.py:123–141  ·  view source on GitHub ↗

检查任务是否执行完毕 :return: True | False

(self)

Source from the content-addressed store, hash-verified

121 return False
122
123 def _check_task_done(self):
124 """检查任务是否执行完毕
125
126 :return: True | False
127 """
128
129 proc_status = self._task_proc.poll()
130 if proc_status is None: # 未执行完成
131 # 判断是否超时
132 if self._check_task_expired():
133 return True
134 else:
135 return False
136 else:
137 if proc_status != 0:
138 self.code = errcode.E_NODE_TASK
139 self.msg = 'task process exited with code: %d' % proc_status
140 self.data = ''.join(self._read_tail_lines(self.task_log))
141 return True
142
143 @property
144 def done(self):

Callers 1

doneMethod · 0.95

Calls 2

_check_task_expiredMethod · 0.95
_read_tail_linesMethod · 0.95

Tested by

no test coverage detected