| 1 |
#!Jinja2 |
| 2 |
[scheduler] |
| 3 |
[[events]] |
| 4 |
expected task failures = 1/t1, 1/t2, 1/t3, 1/t4, 1/stop2 |
| 5 |
|
| 6 |
[scheduling] |
| 7 |
[[graph]] |
| 8 |
R1 = """ |
| 9 |
t1:start & t2:start => stop1 => |
| 10 |
t3:start & t4:start => stop2? |
| 11 |
stop2:fail? => shutdown |
| 12 |
""" |
| 13 |
|
| 14 |
[runtime] |
| 15 |
[[T]] |
| 16 |
script = sleep 120 & echo $! >file; wait |
| 17 |
[[t1, t2, t3, t4]] |
| 18 |
inherit= T |
| 19 |
[[stop1]] |
| 20 |
script = """ |
| 21 |
# Kill 1/t1 and 1/t2 explicitly. |
| 22 |
cylc kill $CYLC_WORKFLOW_ID// //1/t1 //1/t2 || true |
| 23 |
""" |
| 24 |
[[stop2]] |
| 25 |
script = """ |
| 26 |
# Kill 1/t3, 1/t4, and myself! implicitly (kill all active tasks). |
| 27 |
cylc kill "$CYLC_WORKFLOW_ID//*" || true |
| 28 |
sleep 30 |
| 29 |
""" |
| 30 |
[[shutdown]] |
| 31 |
script = "cylc stop $CYLC_WORKFLOW_ID" |