repl-chris commented on code in PR #23690:
URL: https://github.com/apache/airflow/pull/23690#discussion_r875057397
##########
airflow/executors/celery_executor.py:
##########
@@ -315,25 +320,23 @@ def sync(self) -> None:
self.log.debug("No task to query celery, skipping sync")
return
self.update_all_task_states()
+ self._check_for_stalled_tasks()
- if self.adopted_task_timeouts:
- self._check_for_stalled_adopted_tasks()
-
- def _check_for_stalled_adopted_tasks(self):
+ @provide_session
+ def _check_for_stalled_tasks(self, session: Session = NEW_SESSION):
Review Comment:
So, just making sure I understand. Do you want the adopted and normal tasks
each tracked in their own dict and handled completely separately? Because
currently there is no difference between them other than (potentially) how long
they waited to time out, based on the configuration. It seems like it would be
adding complexity to duplicate all the code to read from different dicts?
Tracking in 2 separate dicts would solve the sorting issue though - each dict
would inherently remain sorted then, so that's nice....I'll play with it
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]