diff --git a/cylc/flow/scheduler.py b/cylc/flow/scheduler.py index 9164d950536..dfa0c19c4c5 100644 --- a/cylc/flow/scheduler.py +++ b/cylc/flow/scheduler.py @@ -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( diff --git a/cylc/flow/task_pool.py b/cylc/flow/task_pool.py index 6c9cc51148b..fba58236342 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" ) @@ -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() )