diff --git a/cylc/flow/scheduler.py b/cylc/flow/scheduler.py index 9164d950536..66eacb56544 100644 --- a/cylc/flow/scheduler.py +++ b/cylc/flow/scheduler.py @@ -737,7 +737,7 @@ def restart_remote_init(self): itask.platform['install target'] = ( get_install_target_from_platform(itask.platform)) if ( - itask.state(*TASK_STATUSES_ACTIVE) + itask.state(*TASK_STATUSES_ACTIVE, TASK_STATUS_PREPARING) and not ( is_platform_with_target_in_list( itask.platform['install target'], diff --git a/cylc/flow/task_pool.py b/cylc/flow/task_pool.py index 6c9cc51148b..10fa629064a 100644 --- a/cylc/flow/task_pool.py +++ b/cylc/flow/task_pool.py @@ -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" ) @@ -895,7 +895,7 @@ def can_stop(self, stop_mode): return not any( ( stop_mode in [StopMode.REQUEST_CLEAN, StopMode.REQUEST_KILL] - and itask.state(*TASK_STATUSES_ACTIVE) + and itask.state(*TASK_STATUSES_ACTIVE, TASK_STATUS_PREPARING) and not itask.state.kill_failed ) for itask in self.get_tasks()