From d7a838c844edb121f02aaa78126abd2c5227bde8 Mon Sep 17 00:00:00 2001 From: aspiringmind-code Date: Tue, 9 Jul 2024 10:08:46 +0200 Subject: [PATCH 1/2] Adding detailed message in case of 'WAITING' task status See https://github.com/dmwm/CRABServer/wiki/Task-scheduling --- src/python/CRABClient/ClientUtilities.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/python/CRABClient/ClientUtilities.py b/src/python/CRABClient/ClientUtilities.py index c34ca913..5df6d4db 100644 --- a/src/python/CRABClient/ClientUtilities.py +++ b/src/python/CRABClient/ClientUtilities.py @@ -760,10 +760,13 @@ def checkStatusLoop(logger, server, api, taskname, targetstatus, cmdname): elif taskStatus in ['NEW', 'HOLDING', 'QUEUED', 'RESUBMIT']: logger.info("Please wait...") time.sleep(30) + elif taskStatus in ['WAITING']: + logger.info("Your Task is WAITING to be scheduled. It will be assigned NEW status subsequently.") + time.sleep(10) else: continuecheck = False logger.info("Please check crab.log") - logger.debug("Task status other than SUBMITFAILED, RESUBMITFAILED, SUBMITTED, UPLOADED, NEW, HOLDING, QUEUED, RESUBMIT") + logger.debug("Task status other than SUBMITFAILED, RESUBMITFAILED, SUBMITTED, UPLOADED, WAITING, NEW, HOLDING, QUEUED, RESUBMIT") ## Break the loop if we were waiting already too much. if currenttime > endtime: continuecheck = False From f125c9afe541c9a478fd9ddacf229ec49d904c1a Mon Sep 17 00:00:00 2001 From: Vijay Chakravarty Date: Mon, 30 Sep 2024 11:36:56 +0200 Subject: [PATCH 2/2] Removing separate elif clause for WAITING status --- src/python/CRABClient/ClientUtilities.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/python/CRABClient/ClientUtilities.py b/src/python/CRABClient/ClientUtilities.py index 5df6d4db..5dae755c 100644 --- a/src/python/CRABClient/ClientUtilities.py +++ b/src/python/CRABClient/ClientUtilities.py @@ -757,12 +757,9 @@ def checkStatusLoop(logger, server, api, taskname, targetstatus, cmdname): else: logger.info("Please wait...") time.sleep(30) - elif taskStatus in ['NEW', 'HOLDING', 'QUEUED', 'RESUBMIT']: + elif taskStatus in ['NEW', 'WAITING', 'HOLDING', 'QUEUED', 'RESUBMIT']: logger.info("Please wait...") time.sleep(30) - elif taskStatus in ['WAITING']: - logger.info("Your Task is WAITING to be scheduled. It will be assigned NEW status subsequently.") - time.sleep(10) else: continuecheck = False logger.info("Please check crab.log")