Prab-27 commented on code in PR #59918:
URL: https://github.com/apache/airflow/pull/59918#discussion_r2700593686
##########
airflow-core/src/airflow/jobs/scheduler_job_runner.py:
##########
@@ -2432,19 +2432,23 @@ def _get_num_times_stuck_in_queued(self, ti:
TaskInstance, session: Session = NE
.limit(1)
)
- query = session.query(Log).where(
- Log.task_id == ti.task_id,
- Log.dag_id == ti.dag_id,
- Log.run_id == ti.run_id,
- Log.map_index == ti.map_index,
- Log.try_number == ti.try_number,
- Log.event == TASK_STUCK_IN_QUEUED_RESCHEDULE_EVENT,
+ statement = (
+ select(func.count())
+ .select_from(Log)
Review Comment:
This also works fine but we can also customize it to use only `select()` and
not `func.count()` here since above query is not using this and we applied it
in `count_result `
What do you think ?
--
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]