Debian Codegraph @

cylc/flow/etc/tutorial/runtime-introduction/flow.cylc

raw
1 #!jinja2
2 [scheduling]
3 initial cycle point = 2000-01-01T00Z
4 final cycle point = 2000-01-01T06Z
5 [[graph]]
6 T00/PT3H = """
7 get_observations_camborne => consolidate_observations
8 get_observations_heathrow => consolidate_observations
9 get_observations_shetland => consolidate_observations
10 get_observations_aldergrove => consolidate_observations
11 """
12 T06/PT6H = """
13 consolidate_observations => forecast
14 consolidate_observations[-PT3H] => forecast
15 consolidate_observations[-PT6H] => forecast
16 get_rainfall => forecast
17 forecast => process_exeter
18 """
19 T12/PT6H = """
20 forecast[-PT6H] => forecast
21 """
22
23 [runtime]
24 [[get_observations_aldergrove]]
25 script = get-observations
26
27 [[get_observations_camborne]]
28 script = get-observations
29
30 [[get_observations_heathrow]]
31 script = get-observations
32
33 [[get_observations_shetland]]
34 script = get-observations
35
36 [[consolidate_observations]]
37 script = sleep 3;
38
39 [[forecast]]
40 script = echo 'Running forecast.'; sleep 5
41
42 [[get_rainfall]]
43 script = cat >rainfall <<<'The rain in Spain falls mainly on the plain'
44
45 [[process_exeter]]
46 script = """
47 python3 -c "
48 from random import choice
49 print(choice(['Windy', 'Rainy', 'Sunny', 'Snowy']))
50 "
51 """
52
53 {% include 'etc/python-job.settings' %}