Skip to content

Commit

Permalink
Fix mssql Connection is busy with results for another command
Browse files Browse the repository at this point in the history
  • Loading branch information
ephraimbuddy committed Jul 5, 2023
1 parent 70be0f4 commit 270467f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion airflow/www/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3611,11 +3611,12 @@ def gantt(self, dag_id: str, session: Session = NEW_SESSION):
TaskInstance.state.is_not(None),
)
.order_by(TaskInstance.start_date)
)
).all()

ti_fails = select(TaskFail).filter_by(run_id=dag_run_id, dag_id=dag_id)
if dag.partial:
ti_fails = ti_fails.where(TaskFail.task_id.in_([t.task_id for t in dag.tasks]))

ti_fails = session.scalars(ti_fails)
tasks = []
for ti in tis:
Expand Down

0 comments on commit 270467f

Please sign in to comment.