From 8a32905a0ac8ac7cb9e920aa3bec5fb05178737c Mon Sep 17 00:00:00 2001 From: Oliver Sanders Date: Mon, 14 Sep 2020 16:58:19 +0100 Subject: [PATCH] auto-restart: only wait for local jobs running on localhost --- CHANGES.md | 4 ++++ cylc/flow/scheduler.py | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 874fa65db4f..bd2be46cea1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -70,6 +70,10 @@ templates in [runtime][X][environment]. ### Fixes +[#3815](https://github.com/cylc/cylc-flow/pull/3815) - Fixes a minor bug in the +auto-restart functionality which caused suites to wait for local jobs running +on *any* host to complete before restarting. + [#3732](https://github.com/cylc/cylc-flow/pull/3732) - XTrigger labels are now validated to ensure that runtime errors can not occur when exporting environment variables. diff --git a/cylc/flow/scheduler.py b/cylc/flow/scheduler.py index 2fe4cd11301..8882b967645 100644 --- a/cylc/flow/scheduler.py +++ b/cylc/flow/scheduler.py @@ -47,7 +47,11 @@ ) import cylc.flow.flags from cylc.flow.host_select import select_suite_host -from cylc.flow.hostuserutil import get_host, get_user +from cylc.flow.hostuserutil import ( + get_host, + get_user, + is_remote_platform +) from cylc.flow.job_pool import JobPool from cylc.flow.loggingutil import ( TimestampRotatingFileHandler, @@ -1528,6 +1532,7 @@ async def suite_shutdown(self): if ( itask.state(*TASK_STATUSES_ACTIVE) and itask.summary['batch_sys_name'] + and not is_remote_platform(itask.platform) and self.task_job_mgr.batch_sys_mgr .is_job_local_to_host( itask.summary['batch_sys_name'])