Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cylc/flow/data_store_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
TASK_STATUS_RUNNING,
TASK_STATUS_SUCCEEDED,
TASK_STATUS_FAILED,
TASK_STATUS_UNKNOWN,
TASK_STATUSES_ORDERED
)
from cylc.flow.task_state_prop import extract_group_state
Expand Down Expand Up @@ -1277,6 +1278,7 @@ def generate_ghost_task(
id=tp_id,
task=t_id,
cycle_point=point_string,
state=TASK_STATUS_UNKNOWN,
is_held=(
(name, point)
in self.schd.pool.tasks_to_hold
Expand Down
10 changes: 8 additions & 2 deletions cylc/flow/task_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
TASK_STATUS_SUCCEEDED = "succeeded"
# Job execution failed:
TASK_STATUS_FAILED = "failed"
# Task status to be determined
TASK_STATUS_UNKNOWN = "unknown"
# Job execution failed, but will try again soon:

TASK_STATUS_DESC = {
Expand All @@ -78,7 +80,9 @@
TASK_STATUS_FAILED:
'Job has returned non-zero exit code.',
TASK_STATUS_SUCCEEDED:
'Job has returned zero exit code.'
'Job has returned zero exit code.',
TASK_STATUS_UNKNOWN:
'Job status yet to be determined.'
}

# Task statuses ordered according to task runtime progression.
Expand All @@ -90,7 +94,8 @@
TASK_STATUS_SUBMITTED,
TASK_STATUS_RUNNING,
TASK_STATUS_FAILED,
TASK_STATUS_SUCCEEDED
TASK_STATUS_SUCCEEDED,
TASK_STATUS_UNKNOWN
]

# Task statuses ordered according to display importance
Expand All @@ -103,6 +108,7 @@
TASK_STATUS_PREPARING,
TASK_STATUS_SUCCEEDED,
TASK_STATUS_WAITING,
TASK_STATUS_UNKNOWN
]

TASK_STATUSES_ALL = set(TASK_STATUSES_ORDERED)
Expand Down
9 changes: 6 additions & 3 deletions cylc/flow/task_state_prop.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
TASK_STATUS_SUBMIT_FAILED,
TASK_STATUS_RUNNING,
TASK_STATUS_SUCCEEDED,
TASK_STATUS_FAILED
TASK_STATUS_FAILED,
TASK_STATUS_UNKNOWN,
)


Expand All @@ -37,7 +38,8 @@ def extract_group_state(child_states, is_stopped=False):
TASK_STATUS_SUBMITTED,
TASK_STATUS_PREPARING,
TASK_STATUS_WAITING,
TASK_STATUS_SUCCEEDED
TASK_STATUS_SUCCEEDED,
TASK_STATUS_UNKNOWN
]
if is_stopped:
ordered_states = [
Expand All @@ -48,7 +50,8 @@ def extract_group_state(child_states, is_stopped=False):
TASK_STATUS_EXPIRED,
TASK_STATUS_PREPARING,
TASK_STATUS_SUCCEEDED,
TASK_STATUS_WAITING
TASK_STATUS_WAITING,
TASK_STATUS_UNKNOWN
]
for state in ordered_states:
if state in child_states:
Expand Down
6 changes: 4 additions & 2 deletions cylc/flow/tui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
TASK_STATUS_SUBMITTED,
TASK_STATUS_RUNNING,
TASK_STATUS_FAILED,
TASK_STATUS_SUCCEEDED
TASK_STATUS_SUCCEEDED,
TASK_STATUS_UNKNOWN
)

TUI = """
Expand Down Expand Up @@ -82,7 +83,8 @@
f'{TASK_STATUS_SUCCEEDED}': '\u25CF',
f'{TASK_STATUS_EXPIRED}': '\u25CC',
f'{TASK_STATUS_SUBMIT_FAILED}': '\u2298',
f'{TASK_STATUS_FAILED}': '\u2297'
f'{TASK_STATUS_FAILED}': '\u2297',
f'{TASK_STATUS_UNKNOWN}': '\u003f',
}

# unicode modifiers for special task states
Expand Down
Loading