Skip to content

Commit

Permalink
Merge pull request #7129 from michmx/v8r0-introducing-job-status-scou…
Browse files Browse the repository at this point in the history
…ting

[8.0] Introducing Job Status scouting in WMS
  • Loading branch information
fstagni authored Jul 26, 2023
2 parents 8589cb6 + c14b164 commit 8a0fe38
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions src/DIRAC/WorkloadManagementSystem/Client/JobStatus.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#:
STAGING = "Staging"
#:
SCOUTING = "Scouting"
#:
WAITING = "Waiting"
#:
MATCHED = "Matched"
Expand Down Expand Up @@ -43,6 +45,7 @@
SUBMITTING,
RECEIVED,
CHECKING,
SCOUTING,
STAGING,
WAITING,
MATCHED,
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 8a0fe38

Please sign in to comment.