Skip to content

Commit e92a0ed

Browse files
authored
#4019: Add housekeeping to RTW
1 parent cdd278b commit e92a0ed

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

doc/sphinx/source/utils/RTW/common.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
.. |KGOs| replace:: :term:`KGOs`
1212
.. |KGO| replace:: :term:`KGOs`
1313
.. |Rose| replace:: :term:`Rose`
14+
.. |rose_prune| replace:: ``rose_prune``
1415

1516
.. Links
1617

@@ -24,6 +25,7 @@
2425
.. _ESMValTool PR #3664: https://github.com/ESMValGroup/ESMValTool/pull/3664
2526
.. _jasmin-recipes.jinja: https://github.com/ESMValGroup/ESMValTool/blob/main/esmvaltool/utils/recipe_test_workflow/site/jasmin-recipes.jinja
2627
.. _Jinja2: https://jinja.palletsprojects.com/en/stable/
28+
.. _metoffice-recipes.jinja: https://github.com/ESMValGroup/ESMValTool/blob/main/esmvaltool/utils/recipe_test_workflow/site/metoffice-recipes.jinja
2729
.. _new ESMValTool issue: https://github.com/ESMValGroup/ESMValTool/issues/new
2830
.. _Rose Documentation: https://metomi.github.io/rose/doc/html/index.html
29-
.. _metoffice-recipes.jinja: https://github.com/ESMValGroup/ESMValTool/blob/main/esmvaltool/utils/recipe_test_workflow/site/metoffice-recipes.jinja
31+
.. _rose_prune: https://metomi.github.io/rose/doc/html/api/built-in/rose_prune.html

doc/sphinx/source/utils/RTW/user_guide/workflow.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,17 @@ The |RTW| performs the following steps:
6565
Runs each cycle for every recipe defined in the |RTW| after ``process``
6666
has completed
6767

68+
``housekeeping``
69+
:Description:
70+
Removes the logs and data (including recipe outputs)
71+
from two days or more before the current cycle
72+
:Runs on:
73+
Localhost
74+
:Executes:
75+
The |rose_prune|_ application
76+
:Details:
77+
Runs at the end of each cycle (except the first cycle)
78+
6879
Design considerations
6980
---------------------
7081

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
meta=rose_prune
2+
mode=rose_prune
3+
4+
[prune]
5+
prune-remote-logs-at=-P2D
6+
prune{share/cycle}=-P2D
7+
prune{work}=-P2D

esmvaltool/utils/recipe_test_workflow/flow.cylc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
# of the process and compare tasks.
4646
process<fast>:fail? | compare<fast>:finish => generate_report
4747
process<medium>:fail? | compare<medium>:finish => generate_report
48+
generate_report => housekeeping
4849
"""
4950

5051
[runtime]
@@ -161,4 +162,7 @@
161162
PRODUCTION = {{ PRODUCTION }}
162163
REPORT_PATH = ${ROSE_DATAC}/status_report.html
163164

165+
[[housekeeping]]
166+
platform = localhost
167+
164168
{% include "site/" ~ SITE ~ "/runtime.cylc" %}

0 commit comments

Comments
 (0)