From ad6fe3759723cb470789cfa6d9e3059cfe492e31 Mon Sep 17 00:00:00 2001 From: Jake Smith <jws52@cam.ac.uk> Date: Mon, 10 Oct 2022 12:01:07 +0100 Subject: [PATCH] feat: Basic catch-up script This might be useful if ever rerunning a full day of results following Met Office results. It has the basic dependencies that exist between EWS components. It's rudimentary, but beats manually waiting and watching for jobs to finish before starting the next component. A much better tool would be a workflow manager with some sort of 'backfill' or 'rerun' option... --- catchup_day.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 catchup_day.sh diff --git a/catchup_day.sh b/catchup_day.sh new file mode 100755 index 0000000..e49762a --- /dev/null +++ b/catchup_day.sh @@ -0,0 +1,36 @@ +#/bin/bash +# A script that runs all of a day's wheat rust forecasts in order +# 1: depo +# 2: env +# 3: epi +# 4: advisory + +echo "starting catchup" + +config=$1 # /storage/app/EWS_prod/regions/EastAfrica/resources/coordinator/configs/config_EastAfrica_fc_live.json +date=$2 # 20221009 + +# depo +/storage/app/EWS_prod/code/coordinator/run_Processor.sh -p Deposition -c $config -s $date & + +# Wait at least a minute so that logfile timestamps do not clash +sleep 70 + +# env +/storage/app/EWS_prod/code/coordinator/run_Processor.sh -p Environment -c $config -s $date & + +# wait for depo and env to finish +wait + +# epi +/storage/app/EWS_prod/code/coordinator/run_Processor.sh -p Epidemiology -c $config -s $date & + +# Wait at least a minute so that logfile timestamps do not clash +sleep 70 + +# advisory +/storage/app/EWS_prod/code/coordinator/run_Processor.sh -p Advisory -c $config -s $date & + +wait + +echo "finished catchup" -- GitLab