This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 98f5ce269a Fix the type hint for tis_query in _process_executor_events
(#36655)
98f5ce269a is described below
commit 98f5ce269acf7165b4c620f7a018d5ba34a7606e
Author: Hussein Awala <[email protected]>
AuthorDate: Mon Jan 8 01:38:19 2024 +0100
Fix the type hint for tis_query in _process_executor_events (#36655)
---
airflow/jobs/scheduler_job_runner.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/airflow/jobs/scheduler_job_runner.py
b/airflow/jobs/scheduler_job_runner.py
index b3fbb30655..85dccbb26a 100644
--- a/airflow/jobs/scheduler_job_runner.py
+++ b/airflow/jobs/scheduler_job_runner.py
@@ -706,13 +706,13 @@ class SchedulerJobRunner(BaseJobRunner, LoggingMixin):
query =
select(TI).where(filter_for_tis).options(selectinload(TI.dag_model))
# row lock this entire set of taskinstances to make sure the scheduler
doesn't fail when we have
# multi-schedulers
- tis: Iterator[TI] = with_row_locks(
+ tis_query: Query = with_row_locks(
query,
of=TI,
session=session,
**skip_locked(session=session),
)
- tis = session.scalars(tis)
+ tis: Iterator[TI] = session.scalars(tis_query)
for ti in tis:
try_number = ti_primary_key_to_try_number_map[ti.key.primary]
buffer_key = ti.key.with_try_number(try_number)