| 1 |
#!jinja2 |
| 2 |
{%- set TEST_DIR = environ['TEST_DIR'] %} |
| 3 |
[scheduler] |
| 4 |
UTC mode = True |
| 5 |
[[events]] |
| 6 |
abort on stall timeout = True |
| 7 |
stall timeout = PT3M |
| 8 |
[scheduling] |
| 9 |
initial cycle point = 20130923T00 |
| 10 |
final cycle point = 20130926T00 |
| 11 |
[[graph]] |
| 12 |
PT12H = """ |
| 13 |
foo[-PT12H] => foo => bar |
| 14 |
bar[-P1D] => bar |
| 15 |
""" |
| 16 |
R1/20130925T0000Z = """ |
| 17 |
bar[-P1D] & bar[-PT12H] & foo[-PT12H] => shutdown => output_states |
| 18 |
output_states => foo => bar |
| 19 |
""" |
| 20 |
[runtime] |
| 21 |
[[foo,bar]] |
| 22 |
script = """ |
| 23 |
sleep 1 |
| 24 |
""" |
| 25 |
[[[meta]]] |
| 26 |
description = "Placeholder tasks for dependencies" |
| 27 |
[[OUTPUT]] |
| 28 |
script = """ |
| 29 |
sleep 5 |
| 30 |
ctb-select-task-states \ |
| 31 |
"${CYLC_WORKFLOW_RUN_DIR}" "${CYLC_TASK_NAME}" \ |
| 32 |
> "${CYLC_WORKFLOW_RUN_DIR}/$OUTPUT_SUFFIX-db" |
| 33 |
""" |
| 34 |
[[shutdown]] |
| 35 |
inherit = OUTPUT |
| 36 |
post-script = """ |
| 37 |
cylc shutdown $CYLC_WORKFLOW_ID |
| 38 |
sleep 5 |
| 39 |
""" |
| 40 |
[[[meta]]] |
| 41 |
description = "Force a shutdown of the workflow" |
| 42 |
[[[environment]]] |
| 43 |
OUTPUT_SUFFIX=pre-restart |
| 44 |
[[output_states]] |
| 45 |
inherit = OUTPUT |
| 46 |
pre-script = """ |
| 47 |
sleep 5 |
| 48 |
""" |
| 49 |
[[[meta]]] |
| 50 |
description = "Wait for the restart to complete, then output states" |
| 51 |
[[[environment]]] |
| 52 |
OUTPUT_SUFFIX=post-restart |