Debian Codegraph @

tests/f/spawn-on-demand/02-merge/flow.cylc

raw
1 # 3/foo triggers a new flow at 1/foo and waits for it to catch up and merge.
2 # bar checks for the expected flow names at each cycle point.
3 [scheduling]
4 cycling mode = integer
5 initial cycle point = 1
6 final cycle point = 3
7 [[graph]]
8 P1 = "foo[-P1] => foo => bar"
9 [runtime]
10 [[foo]]
11 script = """
12 if (( CYLC_TASK_CYCLE_POINT == 3 )); then
13 cylc trigger --flow=new --meta=other "${CYLC_WORKFLOW_ID}//1/foo"
14 cylc__job__poll_grep_workflow_log 'merged in'
15 fi
16 """
17 [[bar]]
18 script = """
19 if [[ $CYLC_TASK_JOB == *01 ]]; then
20 # job(01)
21 if (( CYLC_TASK_CYCLE_POINT == 3 )); then
22 test $CYLC_TASK_FLOW_NUMBERS == "1,2"
23 else
24 test $CYLC_TASK_FLOW_NUMBERS == "1"
25 fi
26 else
27 # job(02)
28 test $CYLC_TASK_FLOW_NUMBERS == "2"
29 fi
30 """