From 6b578be2aca30b905b4cf6f377984f2289012d1b Mon Sep 17 00:00:00 2001 From: peterdudfield Date: Thu, 7 Nov 2024 17:35:28 +0000 Subject: [PATCH] run metrics at 21.00, not in the middle of the day --- .../services/airflow/dags/uk/dayafter-dag.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/terraform/modules/services/airflow/dags/uk/dayafter-dag.py b/terraform/modules/services/airflow/dags/uk/dayafter-dag.py index cd31f297..785d6e5b 100644 --- a/terraform/modules/services/airflow/dags/uk/dayafter-dag.py +++ b/terraform/modules/services/airflow/dags/uk/dayafter-dag.py @@ -62,7 +62,7 @@ max_active_tasks=10, ) as dag2: - dag2.doc_md = "Get GSP PVLive updated values, and then triggers metrics DAG" + dag2.doc_md = "Get GSP PVLive updated values" gsp_day_after = EcsRunTaskOperator( task_id=f'{region}-gsp-day-after', @@ -82,6 +82,17 @@ task_concurrency=10, ) + gsp_day_after + +with DAG( + f'{region}-metrics-day-after', + schedule_interval="0 21 * * *", + default_args=default_args, + concurrency=10, + max_active_tasks=10, +) as dag3: + dag3.doc_md = "Get Metrics" + metrics = EcsRunTaskOperator( task_id=f'{region}-metrics', task_definition='metrics', @@ -99,4 +110,4 @@ task_concurrency=10, ) - gsp_day_after >> metrics + metrics