Prab-27 commented on code in PR #59918:
URL: https://github.com/apache/airflow/pull/59918#discussion_r2700596985


##########
airflow-core/src/airflow/utils/db_cleanup.py:
##########
@@ -224,10 +224,8 @@ def _do_delete(
     batch_counter = itertools.count(1)
 
     while True:
-        limited_query = query.limit(batch_size) if batch_size else query
-        if (
-            
session.scalars(select(func.count()).select_from(limited_query.subquery())).one()
 == 0
-        ):  # nothing left to delete

Review Comment:
   It's also good to add this comment in the` if` statement as it is 
   
   WDYT ? 



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