ashb commented on a change in pull request #10949:
URL: https://github.com/apache/airflow/pull/10949#discussion_r489568804



##########
File path: airflow/executors/celery_executor.py
##########
@@ -142,7 +146,11 @@ def __init__(self):
             self._sync_parallelism = max(1, cpu_count() - 1)
         self.bulk_state_fetcher = BulkStateFetcher(self._sync_parallelism)
         self.tasks = {}
-        self.last_state = {}
+        # Mapping of tasks we've adopted, ordered by the earliest date they 
timeout
+        self.adopted_task_timeouts: Dict[TaskInstanceKey, datetime.datetime] = 
OrderedDict()
+        self.adoption_timeout = datetime.timedelta(
+            seconds=conf.getint('celery', 'adopted_task_timeout', fallback=600)

Review comment:
       Good shout. I'll rename `adopted_task_timeouts` to 
`adopted_task_by_timeout`? `abandon_adopted_tasks_after`?




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to