From 2b4f98d85bae3876fda79a449bd90e2b9c067d7b Mon Sep 17 00:00:00 2001 From: Michel Date: Tue, 25 Jul 2023 16:25:41 +0200 Subject: [PATCH 1/2] Reintroducing Staging to Checking transition --- src/DIRAC/WorkloadManagementSystem/Client/JobStatus.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DIRAC/WorkloadManagementSystem/Client/JobStatus.py b/src/DIRAC/WorkloadManagementSystem/Client/JobStatus.py index 06a4a7b7086..8c9896d9f2e 100644 --- a/src/DIRAC/WorkloadManagementSystem/Client/JobStatus.py +++ b/src/DIRAC/WorkloadManagementSystem/Client/JobStatus.py @@ -95,8 +95,8 @@ def __init__(self, state): 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, [WAITING, FAILED, KILLED], defState=STAGING), - SCOUTING: State(2, [CHECKING, FAILED, STALLED, KILLED], defState=SCOUTING), + STAGING: State(3, [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 From 99bb360526004a1db3233cfe965001f7e4261ee0 Mon Sep 17 00:00:00 2001 From: Michel Date: Tue, 25 Jul 2023 17:24:15 +0200 Subject: [PATCH 2/2] Re-enumerating the job state IDs after introducing scouting --- .../Client/JobStatus.py | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/DIRAC/WorkloadManagementSystem/Client/JobStatus.py b/src/DIRAC/WorkloadManagementSystem/Client/JobStatus.py index 8c9896d9f2e..9eab5d7f878 100644 --- a/src/DIRAC/WorkloadManagementSystem/Client/JobStatus.py +++ b/src/DIRAC/WorkloadManagementSystem/Client/JobStatus.py @@ -84,18 +84,18 @@ 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), + 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),