| 1 |
#!jinja2 |
| 2 |
[scheduler] |
| 3 |
[[events]] |
| 4 |
stall timeout = PT0S |
| 5 |
|
| 6 |
[scheduling] |
| 7 |
cycling mode = integer |
| 8 |
final cycle point = 2 |
| 9 |
[[graph]] |
| 10 |
P1 = remote_task[-P1] => toggler => remote_task |
| 11 |
|
| 12 |
[runtime] |
| 13 |
[[remote_task]] |
| 14 |
platform = $(cat ${CYLC_WORKFLOW_RUN_DIR}/pretend-hall-info) |
| 15 |
|
| 16 |
[[toggler]] |
| 17 |
# Toggle the platform between localhost and the remote host |
| 18 |
# using the content of a file, ${CYLC_WORKFLOW_RUN_DIR}/pretend-hall-info. |
| 19 |
script = """ |
| 20 |
if (( $CYLC_TASK_CYCLE_POINT % 2 == 1 )); then |
| 21 |
echo ${REMOTE_PLATFORM} > ${CYLC_WORKFLOW_RUN_DIR}/pretend-hall-info |
| 22 |
cylc message -- "changing platform to ${REMOTE_PLATFORM}" |
| 23 |
else |
| 24 |
echo "localhost" > ${CYLC_WORKFLOW_RUN_DIR}/pretend-hall-info |
| 25 |
cylc message -- "changing platform to localhost" |
| 26 |
fi |
| 27 |
""" |
| 28 |
[[[environment]]] |
| 29 |
REMOTE_PLATFORM = {{ CYLC_TEST_PLATFORM }} |