Debian Codegraph @

tests/functional/pause-resume/12-pause-then-retry/flow.cylc

raw
1 [meta]
2 title = Test: run task - pause workflow - task job retry - resume workflow
3
4 [scheduler]
5 [[events]]
6 abort on stall timeout = True
7 stall timeout = PT0S
8 abort on inactivity timeout = True
9 inactivity timeout = PT3M
10
11 [scheduling]
12 [[graph]]
13 R1 = """
14 t-retry-able:start => t-pause
15 t-submit-retry-able:submit => t-pause
16 """
17
18 [runtime]
19 [[t-pause]]
20 script = """
21 cylc pause "${CYLC_WORKFLOW_ID}"
22 cylc__job__poll_grep_workflow_log 'Command "pause" actioned'
23
24 # Poll t-submit-retry-able, should return submit-fail
25 cylc poll "${CYLC_WORKFLOW_ID}//*/t-submit-retry-able"
26 # Allow t-retry-able to continue
27 rm -f "${CYLC_WORKFLOW_RUN_DIR}/file"
28
29 cylc__job__poll_grep_workflow_log -E \
30 '1/t-retry-able/01:running.* => waiting'
31
32 cylc__job__poll_grep_workflow_log -E \
33 '1/t-submit-retry-able/01:submitted.* => waiting'
34
35 # Resume the workflow
36 cylc play "${CYLC_WORKFLOW_ID}"
37
38 cylc__job__poll_grep_workflow_log -E \
39 '1/t-retry-able:waiting.* => waiting\(queued\)'
40
41 cylc__job__poll_grep_workflow_log -E \
42 '1/t-submit-retry-able:waiting.* => waiting\(queued\)'
43 """
44 [[t-retry-able]]
45 script = """
46 if ((CYLC_TASK_SUBMIT_NUMBER == 1)); then
47 touch "${CYLC_WORKFLOW_RUN_DIR}/file"
48 while [[ -e "${CYLC_WORKFLOW_RUN_DIR}/file" ]]; do
49 sleep 1
50 done
51 false
52 fi
53 """
54 execution retry delays = PT5S
55 [[t-submit-retry-able]]
56 init-script = """
57 if [[ "${CYLC_TASK_JOB}" == *"/01" ]]; then
58 cylc__job__disable_fail_signals ERR EXIT
59 exit 1
60 fi
61 """
62 script = true
63 submission retry delays = PT5S