Debian Codegraph @

tests/functional/flow-triggers/06-new-past-switch/flow.cylc

raw
1 # a:x? => b => c
2 # a:y? => d => e
3 #
4 # Start with the "x" pathway completed and re-trigger "a".
5 # The second run of "a" yields the output "y".
6 #
7 # flow:1
8 # a(succeeded:x)
9 # b(succeeded)
10 # c(succeeded)
11 # flow:<new>
12 # a(running)
13 #
14 # by:
15 # cylc trigger --flow=new a
16 #
17 # Result:
18 # Task "a" is re-run, the workflow runs on from there following the "y" pathway.
19 #
20 # flow:1
21 # a (the naturally triggered run)
22 # b
23 # c
24 # flow:2
25 # a (the manually triggered run)
26 # d
27 # e
28
29 [scheduler]
30 allow implicit tasks = True
31 [[events]]
32 abort on stall timeout = True
33 stall timeout = PT0S
34 abort on inactivity timeout = True
35 inactivity timeout = PT1M
36
37 [scheduling]
38 [[graph]]
39 R1 = """
40 a:x? => b => c
41 a:y? => d => e
42 """
43 [runtime]
44 [[a]]
45 script = """
46 if (( CYLC_TASK_SUBMIT_NUMBER == 1 )); then
47 cylc message x
48 else
49 cylc message y
50 fi
51 """
52 [[[outputs]]]
53 x = x
54 y = y
55 [[c]]
56 script = """
57 cylc trigger --flow=new ${CYLC_WORKFLOW_ID}//1/a
58 cylc__job__poll_grep_workflow_log -E '1/a/02\(flows=2\):submitted.*started'
59 """