Skip to content

Commit 26b8388

Browse files
kaxilferruzzi
authored andcommitted
Fix scheduler heartbeat timeout failures with DetachedInstanceError (apache#53838)
1 parent ada62a5 commit 26b8388

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

airflow-core/src/airflow/jobs/scheduler_job_runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2264,7 +2264,7 @@ def _find_task_instances_without_heartbeats(self, *, session: Session) -> list[T
22642264
task_instances_without_heartbeats = session.scalars(
22652265
select(TI)
22662266
.options(selectinload(TI.dag_model))
2267-
.options(selectinload(TI.dag_run))
2267+
.options(selectinload(TI.dag_run).selectinload(DagRun.consumed_asset_events))
22682268
.options(selectinload(TI.dag_version))
22692269
.with_hint(TI, "USE INDEX (ti_state)", dialect_name="mysql")
22702270
.join(DM, TI.dag_id == DM.dag_id)

0 commit comments

Comments
 (0)