You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/06/21 15:12:58 UTC

[GitHub] [airflow] ashb commented on a change in pull request #5420: [AIRFLOW-4797] Fix zombie detection

ashb commented on a change in pull request #5420: [AIRFLOW-4797] Fix zombie detection
URL: https://github.com/apache/airflow/pull/5420#discussion_r294303437
 
 

 ##########
 File path: airflow/utils/dag_processing.py
 ##########
 @@ -1243,35 +1240,31 @@ def _find_zombies(self, session):
         Find zombie task instances, which are tasks haven't heartbeated for too long.
         :return: Zombie task instances in SimpleTaskInstance format.
         """
-        now = timezone.utcnow()
+        # to avoid circular imports
+        from airflow.jobs import LocalTaskJob as LJ
+        self.log.info("Finding 'running' jobs without a recent heartbeat")
+        TI = airflow.models.TaskInstance
+        limit_dttm = timezone.utcnow() - timedelta(
+            seconds=self._zombie_threshold_secs)
+        self.log.info("Failing jobs without heartbeat after %s", limit_dttm)
 
 Review comment:
   This is going to produce quite a lot of logs.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services