kaxil commented on code in PR #57526:
URL: https://github.com/apache/airflow/pull/57526#discussion_r2476142247
##########
airflow-core/src/airflow/jobs/scheduler_job_runner.py:
##########
@@ -679,8 +681,20 @@ def _executable_task_instances_to_queued(self, max_tis:
int, session: Session) -
.execution_options(synchronize_session=False)
)
+ # Update executor field for each task instance before making them
transient
for ti in executable_tis:
+ session.execute(
+ update(TI)
+ .where(
+ TI.dag_id == ti.dag_id,
+ TI.task_id == ti.task_id,
+ TI.run_id == ti.run_id,
+ TI.map_index == ti.map_index,
+ )
+ .values(executor=ti.executor)
+ )
Review Comment:
or does that now work.
The current logic you have will run query for each TI --
--
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]