Debian Codegraph @

tests/functional/restart/lib/flow-runtime-restart.cylc

raw
1 [[OUTPUT]]
2 script = """
3 cylc__job__wait_cylc_message_started
4 # Handle db locks.
5 for i in {0..10}; do
6 ctb-select-task-states \
7 "${CYLC_WORKFLOW_RUN_DIR}" "${CYLC_TASK_NAME}" \
8 > "${CYLC_WORKFLOW_RUN_DIR}/$OUTPUT_SUFFIX-db" && break
9 sleep 1
10 done
11 """
12 [[shutdown]]
13 inherit = OUTPUT
14 post-script = cylc shutdown "${CYLC_WORKFLOW_ID}"
15 [[[meta]]]
16 description = "Force a shutdown of the workflow"
17 [[[environment]]]
18 OUTPUT_SUFFIX=pre-restart
19 [[output_states]]
20 inherit = OUTPUT
21 pre-script = cylc__job__wait_cylc_message_started
22 [[[meta]]]
23 description = "Wait for the restart to complete, then output states"
24 [[[environment]]]
25 OUTPUT_SUFFIX=post-restart
26 [[finish]]
27 script = true