Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Use subtask timeout status in taskmanager (#5136)
Browse files Browse the repository at this point in the history
  • Loading branch information
kmazurek authored Mar 19, 2020
1 parent 64596e2 commit c76c673
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion golem/task/taskmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ def check_timeouts(self):
logger.info("Subtask %r dies with status %r",
s.subtask_id,
s.status.value)
s.status = SubtaskStatus.failure
s.status = SubtaskStatus.timeout
nodes_with_timeouts.append(s.node_id)
t.computation_failed(s.subtask_id)
s.stderr = "[GOLEM] Timeout"
Expand Down
4 changes: 2 additions & 2 deletions tests/golem/task/test_taskmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ def test_check_timeouts(self, *_):
)
self.assertIs(
task_state.subtask_states["aabbcc"].status,
SubtaskStatus.failure,
SubtaskStatus.timeout,
)
# Task with task and subtask timeout
with patch('golem.task.taskbase.Task.needs_computation',
Expand Down Expand Up @@ -869,7 +869,7 @@ def test_check_timeouts(self, *_):
)
self.assertIs(
task_state.subtask_states["qwerty"].status,
SubtaskStatus.failure,
SubtaskStatus.timeout,
)
checker([("qwe", "qwerty", SubtaskOp.TIMEOUT),
("qwe", None, TaskOp.TIMEOUT)])
Expand Down

0 comments on commit c76c673

Please # to comment.