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

Commit

Permalink
Merge pull request #4669 from golemfactory/fix_graceful_shutdown
Browse files Browse the repository at this point in the history
Fix graceful shutdown
  • Loading branch information
mfranciszkiewicz authored Sep 2, 2019
2 parents 3059a00 + e2abdfa commit 32b224b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion golem/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ def _is_task_in_progress(self) -> bool:
logger.debug('_is_task_in_progress? False: task_computer=None')
return False

task_provider_progress = task_server.task_computer.assigned_subtask
task_provider_progress = task_server.task_computer.has_assigned_task()
logger.debug('_is_task_in_progress? provider=%r, requestor=False',
task_provider_progress)
return bool(task_provider_progress)
Expand Down
4 changes: 2 additions & 2 deletions tests/golem/test_opt_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ def test__is_task_in_progress_no_shutdown(self, *_):
self.node.client.task_server.task_computer = mock_tc

mock_tm.get_progresses = Mock(return_value={})
mock_tc.assigned_subtask = None
mock_tc.has_assigned_task = Mock(return_value=False)

result = self.node._is_task_in_progress()

Expand Down Expand Up @@ -933,7 +933,7 @@ def test__is_task_in_progress_quit(self, *_):
self.node.client.task_server.task_computer = mock_tc

mock_tm.get_progresses = Mock(return_value={'a': 'a'})
mock_tc.assigned_subtask = {'a': 'a'}
mock_tc.has_assigned_task = Mock(return_value=True)

result = self.node._is_task_in_progress()

Expand Down

0 comments on commit 32b224b

Please # to comment.