Skip to content

Commit

Permalink
Merge pull request #17913 from mvdbeek/remove_session_after_loop
Browse files Browse the repository at this point in the history
[24.0] Always discard session after __handle_waiting_jobs is done
  • Loading branch information
mvdbeek authored Apr 6, 2024
2 parents fecf279 + 81e9a91 commit 249681d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/galaxy/jobs/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,8 @@ def __monitor_step(self):
self.__handle_waiting_jobs()
except StopSignalException:
pass
finally:
self.sa_session.remove()
log.trace(monitor_step_timer.to_str())

def __handle_waiting_jobs(self):
Expand Down Expand Up @@ -583,9 +585,6 @@ def __handle_waiting_jobs(self):
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
Expand Down

0 comments on commit 249681d

Please sign in to comment.