| 1 |
#!Jinja2 |
| 2 |
[scheduler] |
| 3 |
UTC mode = True |
| 4 |
[[events]] |
| 5 |
expected task failures = 1/local-fail-1, 1/local-fail-2, 1/remote-fail-1 |
| 6 |
[scheduling] |
| 7 |
[[graph]] |
| 8 |
R1 = """ |
| 9 |
POLLABLE:start-all => poller |
| 10 |
POLLABLE:succeed-any # (make member success optional) |
| 11 |
""" |
| 12 |
[runtime] |
| 13 |
[[POLLABLE]] |
| 14 |
init-script = cylc__job__disable_fail_signals ERR EXIT |
| 15 |
[[FAIL]] |
| 16 |
inherit = POLLABLE |
| 17 |
script = """ |
| 18 |
echo 'I am failing...' >&2 |
| 19 |
exit 1 |
| 20 |
""" |
| 21 |
[[local-fail-1, local-fail-2]] |
| 22 |
inherit = FAIL |
| 23 |
[[remote-fail-1]] |
| 24 |
inherit = FAIL |
| 25 |
platform = {{ environ['CYLC_TEST_PLATFORM'] }} |
| 26 |
[[SUCCESS]] |
| 27 |
inherit = POLLABLE |
| 28 |
script = """ |
| 29 |
echo 'I am OK.' |
| 30 |
{ |
| 31 |
echo 'CYLC_JOB_EXIT=SUCCEEDED' |
| 32 |
echo "CYLC_JOB_EXIT_TIME=$(date +%FT%H:%M:%SZ)" |
| 33 |
} >>"${CYLC_TASK_LOG_ROOT}.status" |
| 34 |
exit 1 |
| 35 |
""" |
| 36 |
[[local-success-1]] |
| 37 |
inherit = SUCCESS |
| 38 |
[[remote-success-1, remote-success-2]] |
| 39 |
inherit = SUCCESS |
| 40 |
platform = {{ environ['CYLC_TEST_PLATFORM'] }} |
| 41 |
[[poller]] |
| 42 |
script = """ |
| 43 |
cylc poll "${CYLC_WORKFLOW_ID}//*/POLLABLE" |
| 44 |
cylc stop "${CYLC_WORKFLOW_ID}" |
| 45 |
""" |