From 2cac6c908c5b9f49195cda104d6438c107a172b7 Mon Sep 17 00:00:00 2001 From: Dery Rahman Ahaddienata Date: Wed, 23 Aug 2023 16:56:13 +0700 Subject: [PATCH] patch: retry on sensor failure (#124) --- ext/scheduler/airflow/__lib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/scheduler/airflow/__lib.py b/ext/scheduler/airflow/__lib.py index d0b637de62..ebd0260338 100644 --- a/ext/scheduler/airflow/__lib.py +++ b/ext/scheduler/airflow/__lib.py @@ -13,7 +13,7 @@ from airflow.providers.slack.operators.slack import SlackAPIPostOperator from airflow.sensors.base import BaseSensorOperator from airflow.utils.state import TaskInstanceState -from airflow.exceptions import AirflowFailException +from airflow.exceptions import AirflowException from croniter import croniter from kubernetes.client import models as k8s @@ -256,7 +256,7 @@ def _are_all_job_runs_successful(self, schedule_time_window_start, schedule_time self.log.info("job_run api response :: {}".format(api_response)) except Exception as e: self.log.warning("error while fetching job runs :: {}".format(e)) - raise AirflowFailException(e) + raise AirflowException(e) for job_run in api_response['jobRuns']: if job_run['state'] != 'success': self.log.info("failed for run :: {}".format(job_run))