Skip to content

Commit

Permalink
Always discard session after __handle_waiting_jobs is done
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Apr 5, 2024
1 parent aa0a85d commit df98405
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 df98405

Please sign in to comment.