From e01f95f82f13e7e77219fc2982225d0bf65a5ba9 Mon Sep 17 00:00:00 2001
From: Michiel Cottaar <MichielCottaar@protonmail.com>
Date: Wed, 10 Jun 2020 10:44:16 +0100
Subject: [PATCH] REF: remove wait

qstat should not be called regularly
---
 fsl/utils/fslsub.py | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/fsl/utils/fslsub.py b/fsl/utils/fslsub.py
index 27b455f40..7e4976235 100644
--- a/fsl/utils/fslsub.py
+++ b/fsl/utils/fslsub.py
@@ -378,22 +378,6 @@ def output(job_id, logdir='.', command=None, name=None):
     return stdout, stderr
 
 
-def wait(job_ids):
-    """Wait for one or more jobs to finish
-
-    :arg job_ids: string or tuple of strings with jobs that should finish
-                  before continuing
-    """
-    start_time = time.time()
-    for job_id in _flatten_job_ids(job_ids).split(','):
-        log.debug('Waiting for job {}'.format(job_id))
-        while len(info(job_id)) > 0:
-            wait_time = min(max(1, (time.time() - start_time) / 3.), 20)
-            time.sleep(wait_time)
-        log.debug('Job {} finished, continuing to next'.format(job_id))
-    log.debug('All jobs have finished')
-
-
 def _flatten_job_ids(job_ids):
     """
     Returns a potentially nested sequence of job ids as a single comma-separated string
-- 
GitLab