Debian Codegraph @

tests/f/spawn-on-demand/06-stop-flow-2/flow.cylc

raw
1 # Check that a specified flow can be stopped without affecting the main flow.
2 # Here baz triggers a new flow then waits for the second baz to finish.
3 # Meanwhile the second bar stops its own flow. So order events should be:
4 # 1. foo => bar => baz (flow a)
5 # 2. foo => bar (flow b)
6 # 3. qux (flow a)
7 [scheduler]
8 allow implicit tasks = True
9 [scheduling]
10 [[graph]]
11 R1 = "foo => bar => baz => qux"
12 [runtime]
13 [[bar]]
14 script = """
15 if (( CYLC_TASK_SUBMIT_NUMBER == 2 )); then
16 cylc stop --flow=1 ${CYLC_WORKFLOW_ID}
17 cylc__job__poll_grep_workflow_log 'Command "stop" actioned'
18 fi
19 """
20 [[baz]]
21 script = """
22 if (( CYLC_TASK_SUBMIT_NUMBER == 1 )); then
23 cylc trigger --flow=new --meta=other "${CYLC_WORKFLOW_ID}//1/foo"
24 cylc__job__poll_grep_workflow_log -E "1/bar/02\(flows=2\):running.* => succeeded"
25 fi
26 """