From 39f39799e94376511567e342cd57fb2b40ea03be Mon Sep 17 00:00:00 2001 From: DonHaul Date: Tue, 27 Aug 2024 10:15:35 +0200 Subject: [PATCH] restart actions: on restart use data from previous run * ref: cern-sis/issues-inspire/issues/545 --- backoffice/backoffice/workflows/airflow_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backoffice/backoffice/workflows/airflow_utils.py b/backoffice/backoffice/workflows/airflow_utils.py index 6f570b81..d4fd1790 100644 --- a/backoffice/backoffice/workflows/airflow_utils.py +++ b/backoffice/backoffice/workflows/airflow_utils.py @@ -163,7 +163,7 @@ def restart_workflow_dags(workflow_id, workflow_type, params=None): ) -def delete_workflow_dag_runs(workflow_id, workflow_type): +def delete_workflow_dag_runs(workflow_id, workflow_type, params=None): """Deletes runs of a given workflow. :param workflow_id: workflow_id for dags that should be restarted @@ -181,6 +181,7 @@ def delete_workflow_dag_runs(workflow_id, workflow_type): trigger_airflow_dag( WORKFLOW_DAGS[workflow_type].initialize, str(workflow_id), params or data + ) return JsonResponse( data={"message": f"Dag runs for worfklow {workflow_id} have been deleted"}