From 54889b3f63ba9949f708ab0bb0532367b59ef868 Mon Sep 17 00:00:00 2001 From: Tashrif Billah <35086881+tashrifbillah@users.noreply.github.com> Date: Thu, 7 Nov 2024 17:34:40 -0500 Subject: [PATCH] pass session object to ByTaskIdHandler (required by new sqlalchemy) --- luigi/server.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/luigi/server.py b/luigi/server.py index a10d668dbc..974e3f2cf8 100644 --- a/luigi/server.py +++ b/luigi/server.py @@ -266,8 +266,9 @@ def get(self, id): class ByTaskIdHandler(BaseTaskHistoryHandler): def get(self, task_id): - task = self._scheduler.task_history.find_task_by_task_id(task_id) - self.render("show.html", task=task) + with self._scheduler.task_history._session(None) as session: + task = self._scheduler.task_history.find_task_by_task_id(task_id, session) + self.render("show.html", task=task) class ByParamsHandler(BaseTaskHistoryHandler):