| 1 |
[scheduler] |
| 2 |
[[events]] |
| 3 |
abort on stall timeout = True |
| 4 |
stall timeout = PT0S |
| 5 |
abort on inactivity timeout = True |
| 6 |
inactivity timeout = PT1M |
| 7 |
|
| 8 |
[scheduling] |
| 9 |
[[graph]] |
| 10 |
R1 = t1 => t2 |
| 11 |
|
| 12 |
[runtime] |
| 13 |
[[t1]] |
| 14 |
script = """ |
| 15 |
# wait for the started message to be sent |
| 16 |
cylc__job__wait_cylc_message_started; |
| 17 |
# issue the stop command |
| 18 |
cylc stop --now "${CYLC_WORKFLOW_ID}" |
| 19 |
# wait for the stop command to be recieved |
| 20 |
cylc__job__poll_grep_workflow_log 'Command "stop" received' |
| 21 |
# send a message telling the started handler to exit |
| 22 |
cylc message -- stopping |
| 23 |
""" |
| 24 |
[[[events]]] |
| 25 |
# wait for the stopping message, sleep a bit, then echo some stuff |
| 26 |
started handlers = """ |
| 27 |
cylc workflow-state %(workflow)s//%(point)s/%(name)s:stopping --triggers >/dev/null && sleep 1 && echo 'Hello %(id)s %(event)s' |
| 28 |
""" |
| 29 |
[[[outputs]]] |
| 30 |
stopping = stopping |
| 31 |
[[t2]] |
| 32 |
script = true |