Merge pull request #17913 from mvdbeek/remove_session_after_loop

[24.0] Always discard session after __handle_waiting_jobs is done
This commit is contained in:
Marius van den Beek
2024-04-06 16:28:58 +02:00
committed by GitHub
+2 -3
View File
@@ -395,6 +395,8 @@ class JobHandlerQueue(BaseJobHandlerQueue):
self.__handle_waiting_jobs()
except StopSignalException:
pass
finally:
self.sa_session.remove()
log.trace(monitor_step_timer.to_str())
def __handle_waiting_jobs(self):
@@ -583,9 +585,6 @@ class JobHandlerQueue(BaseJobHandlerQueue):
with transaction(self.sa_session):
self.sa_session.commit()
# Done with the session
self.sa_session.remove()
def __filter_jobs_with_invalid_input_states(self, jobs):
"""
Takes list of jobs and filters out jobs whose input datasets are in invalid state and