From 3a7321b79d1d2d1bd4ce773d5a10e7120d9a8da8 Mon Sep 17 00:00:00 2001 From: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com> Date: Wed, 13 Oct 2021 11:22:12 +0100 Subject: [PATCH] Add short sleep to remote tidy Avoid maxing out CPU! --- cylc/flow/task_remote_mgr.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cylc/flow/task_remote_mgr.py b/cylc/flow/task_remote_mgr.py index fb05d44e05e..05512821498 100644 --- a/cylc/flow/task_remote_mgr.py +++ b/cylc/flow/task_remote_mgr.py @@ -30,7 +30,7 @@ import re from subprocess import Popen, PIPE, DEVNULL import tarfile -from time import time +from time import sleep, time from typing import Any, Deque, Dict, TYPE_CHECKING, List, NamedTuple, Tuple from cylc.flow import LOG, RSYNC_LOG @@ -344,6 +344,7 @@ def construct_remote_tidy_ssh_cmd( item.proc.args, item.proc.returncode, out, err ) ) + sleep(0.1) # Terminate any remaining commands for item in queue: with suppress(OSError):