Skip to content

Commit

Permalink
use runner most recent job
Browse files Browse the repository at this point in the history
  • Loading branch information
dstandish committed Sep 27, 2023
1 parent 0755b1c commit ef577e7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions airflow/models/dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -3980,12 +3980,10 @@ def get_current_dag(cls) -> DAG | None:


def _triggerer_is_healthy():
from airflow.api.common.airflow_health import get_airflow_health
from airflow.jobs.triggerer_job_runner import TriggererJobRunner

health = get_airflow_health()
if health["triggerer"]["status"] != "healthy":
return False
return True
job = TriggererJobRunner.most_recent_job()
return job and job.is_alive()


def _run_task(ti: TaskInstance, session) -> TaskReturnCode | None:
Expand Down

0 comments on commit ef577e7

Please sign in to comment.