Debian Codegraph @

tests/functional/cylc-set/00-set-succeeded/flow.cylc

raw
1 # 1. foo and bar fail incomplete.
2 # 2. setter sets foo and bar to succeeded.
3 # 3. foo and bar are completed, post<m> runs, scheduler shuts down.
4
5 [scheduler]
6 [[events]]
7 inactivity timeout = PT30S
8 abort on inactivity timeout = True
9 expected task failures = 1/foo, 1/bar
10
11 [task parameters]
12 m = 1..2
13
14 [scheduling]
15 [[graph]]
16 R1 = """
17 foo & bar => post<m>
18 foo:started & bar:started => setter
19 """
20 [runtime]
21 [[post<m>]]
22 [[foo, bar]]
23 script = false
24 [[setter]]
25 script = """
26 # wait for foo and bar to fail.
27 for TASK in foo bar
28 do
29 cylc workflow-state \
30 ${CYLC_WORKFLOW_ID}//${CYLC_TASK_CYCLE_POINT}/${TASK}:failed \
31 --max-polls=20 --interval=1
32 done
33 # set foo succeeded (via --output)
34 cylc set -o succeeded $CYLC_WORKFLOW_ID//$CYLC_TASK_CYCLE_POINT/foo
35 # set bar succeeded (via default)
36 cylc set $CYLC_WORKFLOW_ID//$CYLC_TASK_CYCLE_POINT/bar
37 """