Skip to content

Commit

Permalink
Fix the type hint for tis_query in _process_executor_events (#36655)
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein-awala committed Jan 8, 2024
1 parent a3ebc4d commit 98f5ce2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions airflow/jobs/scheduler_job_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,13 +706,13 @@ def _process_executor_events(self, session: Session) -> int:
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)
Expand Down

0 comments on commit 98f5ce2

Please sign in to comment.