Nataneljpwd commented on code in PR #74928:
URL: https://github.com/apache/airflow/pull/74928#discussion_r4682086671


##########
providers/celery/src/airflow/providers/celery/executors/celery_executor.py:
##########
@@ -224,15 +233,16 @@ def _send_workloads(self, workload_tuples_to_send: 
Sequence[WorkloadInCelery]):
                     self.workload_publish_retries[key] = retries + 1
                     continue
             if AIRFLOW_V_3_4_PLUS:
-                if key in self.executor_queues.get(WorkloadType.EXECUTE_TASK, 
{}):
-                    self.executor_queues[WorkloadType.EXECUTE_TASK].pop(key)
-                else:
-                    
self.executor_queues[WorkloadType.EXECUTE_CALLBACK].pop(key, None)
+                for queued in self.executor_queues.values():

Review Comment:
   Probably meant "queue" instead of "queued"



##########
providers/celery/src/airflow/providers/celery/executors/celery_executor.py:
##########
@@ -224,15 +233,16 @@ def _send_workloads(self, workload_tuples_to_send: 
Sequence[WorkloadInCelery]):
                     self.workload_publish_retries[key] = retries + 1
                     continue
             if AIRFLOW_V_3_4_PLUS:
-                if key in self.executor_queues.get(WorkloadType.EXECUTE_TASK, 
{}):
-                    self.executor_queues[WorkloadType.EXECUTE_TASK].pop(key)
-                else:
-                    
self.executor_queues[WorkloadType.EXECUTE_CALLBACK].pop(key, None)
+                for queued in self.executor_queues.values():
+                    if queued.pop(key, None) is not None:
+                        break
             else:
                 if key in self.queued_tasks:
                     self.queued_tasks.pop(key)
-                else:
-                    self.queued_callbacks.pop(key, None)
+                elif key in self.queued_callbacks:
+                    self.queued_callbacks.pop(key)
+                elif AIRFLOW_V_3_3_PLUS:
+                    self.queued_connection_tests.pop(key, None)  # type: 
ignore[attr-defined]

Review Comment:
   Do we want pop to just silently return none in the case the key does not 
exist? As It wasn't done on the other queues, why do it here?
   
   I would prefer it be done similarly on all queues, yet this is just a nit, 
non blocking 



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