zach-overflow commented on code in PR #57832:
URL: https://github.com/apache/airflow/pull/57832#discussion_r2496454143


##########
providers/celery/src/airflow/providers/celery/executors/celery_executor.py:
##########
@@ -443,8 +472,26 @@ def update_task_state(self, key: TaskInstanceKey, state: 
str, info: Any) -> None
                 self.success(key, info)
             elif state in (celery_states.FAILURE, celery_states.REVOKED):
                 self.fail(key, info)
-            elif state in (celery_states.STARTED, celery_states.PENDING, 
celery_states.RETRY):
-                pass
+            elif state == celery_states.PENDING:
+                if self._pending_task_timed_out(key):
+                    pending_duration = time.monotonic() - 
self.task_pending_since[key]
+                    self.log.warning(
+                        "Task %s has been PENDING in Celery for %.1f seconds 
(timeout: %d seconds). "
+                        "Failing task. This typically indicates the task was 
sent to a non-existent "
+                        "queue or no workers are available to pick it up.",

Review Comment:
   Any reason for using the `%`-substitution instead of f-strings here?  



-- 
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]

Reply via email to