Debian Codegraph @

tests/f/restart/broadcast/flow.cylc

raw
1 #!jinja2
2 {%- set TEST_DIR = environ['TEST_DIR'] %}
3 [scheduler]
4 UTC mode = True
5 [[events]]
6 abort on stall timeout = True
7 stall timeout = PT1M
8 [scheduling]
9 initial cycle point = 20130923T00
10 final cycle point = 20130923T00
11 [[graph]]
12 R1 = """
13 send_a_broadcast_task => shutdown
14 shutdown => output_states
15 output_states => broadcast_task
16 broadcast_task => finish
17 """
18 [runtime]
19 [[send_a_broadcast_task]]
20 script = """
21 cylc broadcast -n broadcast_task -p $CYLC_TASK_CYCLE_POINT -s "[environment]MY_VALUE='something'" $CYLC_WORKFLOW_ID
22 cylc broadcast -d $CYLC_WORKFLOW_ID
23 """
24 [[[meta]]]
25 description = "Broadcast setup task"
26 [[broadcast_task]]
27 script = """
28 if [[ "$MY_VALUE" != "something" ]]; then
29 echo "[FAIL] MY_VALUE ($MY_VALUE) not set correctly by broadcast" >&2
30 exit 1
31 fi
32 echo "[PASS] MY_VALUE=$MY_VALUE"
33 """
34 [[[meta]]]
35 description = "Broadcast-recipient task (runs after restart)"
36 [[[environment]]]
37 MY_VALUE=nothing
38 {% include 'flow-runtime-restart.cylc' %}