You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ur...@apache.org on 2021/11/03 07:20:11 UTC
[airflow] branch main updated: Check if job object is None before
calling .is_alive() (#19380)
This is an automated email from the ASF dual-hosted git repository.
uranusjr pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 5c15704 Check if job object is None before calling .is_alive() (#19380)
5c15704 is described below
commit 5c157047b2cc887130fb46fd1a9e88a354c1fb19
Author: Jonathan Fernandes <in...@yahoo.in>
AuthorDate: Wed Nov 3 12:49:49 2021 +0530
Check if job object is None before calling .is_alive() (#19380)
Co-authored-by: Jonathan Fernandes <jf...@virtela.net>
---
airflow/cli/commands/standalone_command.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/airflow/cli/commands/standalone_command.py b/airflow/cli/commands/standalone_command.py
index 58c24fb..41c1684 100644
--- a/airflow/cli/commands/standalone_command.py
+++ b/airflow/cli/commands/standalone_command.py
@@ -228,7 +228,10 @@ class StandaloneCommand:
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):
"""