Skip to content

Commit

Permalink
tasks: add the preparing state to active state checks
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-sanders committed Feb 10, 2022
1 parent 4313a73 commit 67cba6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cylc/flow/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,8 @@ def restart_remote_init(self):
itask.platform['install target'] = (
get_install_target_from_platform(itask.platform))
if (
# we don't need to remote-init for preparing tasks because
# they will be reset to waiting on restart
itask.state(*TASK_STATUSES_ACTIVE)
and not (
is_platform_with_target_in_list(
Expand Down
4 changes: 3 additions & 1 deletion cylc/flow/task_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ def reload_taskdefs(self) -> None:
itask.copy_to_reload_successor(new_task)
self._swap_out(new_task)
LOG.info(f"[{itask}] reloaded task definition")
if itask.state(*TASK_STATUSES_ACTIVE):
if itask.state(*TASK_STATUSES_ACTIVE, TASK_STATUS_PREPARING):
LOG.warning(
f"[{itask}] active with pre-reload settings"
)
Expand Down Expand Up @@ -898,6 +898,8 @@ def can_stop(self, stop_mode):
and itask.state(*TASK_STATUSES_ACTIVE)
and not itask.state.kill_failed
)
# we don't need to check for preparing tasks because they will be
# reset to waiting on restart
for itask in self.get_tasks()
)

Expand Down

0 comments on commit 67cba6a

Please sign in to comment.