Skip to content

Commit

Permalink
patch: retry on sensor failure (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
deryrahman authored Aug 23, 2023
1 parent 93075be commit 2cac6c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/scheduler/airflow/__lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 2cac6c9

Please sign in to comment.