diff --git a/airflow/cli/commands/standalone_command.py b/airflow/cli/commands/standalone_command.py index 58c24fb5f77cb..41c1684fda3f6 100644 --- a/airflow/cli/commands/standalone_command.py +++ b/airflow/cli/commands/standalone_command.py @@ -228,7 +228,10 @@ def job_running(self, job): Checks if the given job name is running and heartbeating correctly (used to tell if scheduler is alive) """ - return job.most_recent_job().is_alive() + recent = job.most_recent_job() + if not recent: + return False + return recent.is_alive() def print_ready(self): """