From 8b28b5740c34149c9b5df56dbbfa034219eb1574 Mon Sep 17 00:00:00 2001 From: Elmar Pruesse Date: Thu, 21 Oct 2021 06:30:36 -0600 Subject: [PATCH] fix: status cmd repeats until killed by 11 *different* signals (#1207) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Count times status_cmd killed by same signal I'm pretty sure this wasn't meant to only abort if the status cmd was killed by more than 10 *different* signals. * fix typo (yes, "extend" and "append" are right next to each other) Co-authored-by: Johannes Köster --- snakemake/executors/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snakemake/executors/__init__.py b/snakemake/executors/__init__.py index 06089242a..0f42fba3d 100644 --- a/snakemake/executors/__init__.py +++ b/snakemake/executors/__init__.py @@ -1073,7 +1073,7 @@ def _wait_for_jobs(self): success = "success" failed = "failed" running = "running" - status_cmd_kills = set() + status_cmd_kills = [] if self.statuscmd is not None: def job_status(job, valid_returns=["running", "success", "failed"]): @@ -1093,7 +1093,7 @@ def job_status(job, valid_returns=["running", "success", "failed"]): # snakemake. # Snakemake will handle the signal in # the main process. - status_cmd_kills.add(e.returncode) + status_cmd_kills.append(-e.returncode) if len(status_cmd_kills) > 10: logger.info( "Cluster status command {} was killed >10 times with signal(s) {} "