Debian Codegraph @

tests/functional/triggering/00-recovery/flow.cylc

raw
1 [meta]
2 title = "automated failure recovery example"
3 description = """
4 Model task failure triggers diagnosis and recovery tasks, which
5 otherwise take themselves out of the workflow if model succeeds.
6 Model post processing triggers off model or recovery tasks.
7 """
8
9 [scheduler]
10 UTC mode = True
11 allow implicit tasks = True
12 [[events]]
13 expected task failures = 20110101T1200Z/model
14
15 [scheduling]
16 initial cycle point = 20110101T00
17 final cycle point = 20110101T12
18 [[graph]]
19 T00,T12 = """
20 pre:finish => model? # finish trigger
21 model:fail? => diagnose => recover # fail trigger
22 model? => !diagnose & !recover # explicit success trigger
23 model:succeed? | recover => post # conditional and explicit success
24 post => !model # removes failed model to allow workflow to auto finish
25 """
26
27 [runtime]
28 [[root]]
29 script = "true" # fast
30 [[model]]
31 script = """
32 echo Hello from $CYLC_TASK_ID
33 if [[ $(cylc cycletime --print-hour) == 12 ]]; then
34 echo "FAILING NOW!"
35 false
36 else
37 echo "Succeeded"
38 true
39 fi
40 """
41 [[[meta]]]
42 description = A task that succeeds at 0 UTC and fails at 12 UTC