Commit d1dbc605 authored by Sebastien Robin's avatar Sebastien Robin

add isTaskAlive method so that a testnode knows if work should be stopped

parent 36f3d6b2
......@@ -270,3 +270,12 @@ class TaskDistributionTool(BaseTool):
assert node is not None
node.edit(cmdline=status_dict['command'],
stdout=status_dict['stdout'], stderr=status_dict['stderr'])
security.declarePublic('isTaskAlive')
def isTaskAlive(self, test_result_path):
"""check status of a test suite
"""
LOG("TaskDistributionTool.checkTaskStatus", 0, repr(test_result_path))
portal = self.getPortalObject()
test_result = portal.restrictedTraverse(test_result_path)
return test_result.getSimulationState() == "started" and 1 or 0
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment