forked from cylc/cylc-flow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflow.cylc
More file actions
31 lines (27 loc) · 1.01 KB
/
flow.cylc
File metadata and controls
31 lines (27 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!jinja2
[scheduler]
[[events]]
stall timeout = PT0S
[scheduling]
cycling mode = integer
final cycle point = 2
[[graph]]
P1 = remote_task[-P1] => toggler => remote_task
[runtime]
[[remote_task]]
platform = $(cat ${CYLC_WORKFLOW_RUN_DIR}/pretend-hall-info)
[[toggler]]
script = """
# Toggle the platform between localhost and the remote host
# using the content of a file, ${CYLC_WORKFLOW_RUN_DIR}/pretend-hall-info.
# between localhost and the remote.
if (( $CYLC_TASK_CYCLE_POINT % 2 == 1 )); then
echo ${REMOTE_PLATFORM} > ${CYLC_WORKFLOW_RUN_DIR}/pretend-hall-info
cylc message -- "changing platform to ${REMOTE_PLATFORM}"
else
echo "localhost" > ${CYLC_WORKFLOW_RUN_DIR}/pretend-hall-info
cylc message -- "changing platform to localhost"
fi
"""
[[[environment]]]
REMOTE_PLATFORM = {{ CYLC_TEST_PLATFORM }}