uranusjr commented on code in PR #31569:
URL: https://github.com/apache/airflow/pull/31569#discussion_r1208818827


##########
airflow/jobs/backfill_job_runner.py:
##########
@@ -183,7 +184,7 @@ def _update_counters(self, ti_status: _DagRunTaskStatus, 
session: Session) -> No
 
         filter_for_tis = TI.filter_for_tis(list(ti_status.running.values()))
         if filter_for_tis is not None:
-            refreshed_tis = session.query(TI).filter(filter_for_tis).all()
+            refreshed_tis = 
session.execute(select(TI).where(filter_for_tis)).scalars().all()

Review Comment:
   ```suggestion
               refreshed_tis = 
session.scalars(select(TI).where(filter_for_tis)).all()
   ```
   
   Is this the same? (p.s. I think the `all()` is not needed either but that 
should probably be another PR)



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