From a0b1e49f76382ed34e51e1f395deb7ec2fcf1756 Mon Sep 17 00:00:00 2001 From: fstagni Date: Wed, 26 Jul 2023 15:48:55 +0200 Subject: [PATCH] sweep: #7129 Introducing Job Status scouting in WMS --- .../Client/JobStatus.py | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/src/DIRAC/WorkloadManagementSystem/Client/JobStatus.py b/src/DIRAC/WorkloadManagementSystem/Client/JobStatus.py index 76872161299..125075e3048 100644 --- a/src/DIRAC/WorkloadManagementSystem/Client/JobStatus.py +++ b/src/DIRAC/WorkloadManagementSystem/Client/JobStatus.py @@ -15,6 +15,8 @@ #: STAGING = "Staging" #: +SCOUTING = "Scouting" +#: WAITING = "Waiting" #: MATCHED = "Matched" @@ -43,6 +45,7 @@ SUBMITTING, RECEIVED, CHECKING, + SCOUTING, STAGING, WAITING, MATCHED, @@ -75,20 +78,21 @@ def __init__(self, state): # States transitions self.states = { - DELETED: State(14), # final state - KILLED: State(13, [DELETED], defState=KILLED), - FAILED: State(12, [RESCHEDULED, DELETED], defState=FAILED), - DONE: State(11, [DELETED], defState=DONE), - COMPLETED: State(10, [DONE, FAILED], defState=COMPLETED), - COMPLETING: State(9, [DONE, FAILED, COMPLETED, STALLED, KILLED], defState=COMPLETING), - STALLED: State(8, [RUNNING, FAILED, KILLED], defState=STALLED), - RUNNING: State(7, [STALLED, DONE, FAILED, RESCHEDULED, COMPLETING, KILLED, RECEIVED], defState=RUNNING), - RESCHEDULED: State(6, [WAITING, RECEIVED, DELETED, FAILED], defState=RESCHEDULED), - MATCHED: State(5, [RUNNING, FAILED, RESCHEDULED, KILLED], defState=MATCHED), - WAITING: State(4, [MATCHED, RESCHEDULED, DELETED], defState=WAITING), - STAGING: State(3, [CHECKING, WAITING, FAILED, KILLED], defState=STAGING), - CHECKING: State(2, [STAGING, WAITING, RESCHEDULED, FAILED, DELETED], defState=CHECKING), - RECEIVED: State(1, [CHECKING, WAITING, FAILED, DELETED], defState=RECEIVED), + DELETED: State(15), # final state + KILLED: State(14, [DELETED], defState=KILLED), + FAILED: State(13, [RESCHEDULED, DELETED], defState=FAILED), + DONE: State(12, [DELETED], defState=DONE), + COMPLETED: State(11, [DONE, FAILED], defState=COMPLETED), + COMPLETING: State(10, [DONE, FAILED, COMPLETED, STALLED, KILLED], defState=COMPLETING), + STALLED: State(9, [RUNNING, FAILED, KILLED], defState=STALLED), + RUNNING: State(8, [STALLED, DONE, FAILED, RESCHEDULED, COMPLETING, KILLED, RECEIVED], defState=RUNNING), + RESCHEDULED: State(7, [WAITING, RECEIVED, DELETED, FAILED], defState=RESCHEDULED), + MATCHED: State(6, [RUNNING, FAILED, RESCHEDULED, KILLED], defState=MATCHED), + WAITING: State(5, [MATCHED, RESCHEDULED, DELETED], defState=WAITING), + STAGING: State(4, [CHECKING, WAITING, FAILED, KILLED], defState=STAGING), + SCOUTING: State(3, [CHECKING, FAILED, STALLED, KILLED], defState=SCOUTING), + CHECKING: State(2, [SCOUTING, STAGING, WAITING, RESCHEDULED, FAILED, DELETED], defState=CHECKING), + RECEIVED: State(1, [SCOUTING, CHECKING, WAITING, FAILED, DELETED], defState=RECEIVED), SUBMITTING: State(0, [RECEIVED, CHECKING, DELETED], defState=SUBMITTING), # initial state }