Skip to content

Commit

Permalink
Merge pull request galaxyproject#17086 from mvdbeek/dev
Browse files Browse the repository at this point in the history
Merge release_23.1 into dev
  • Loading branch information
mvdbeek authored Nov 27, 2023
2 parents d31a812 + d835a6c commit 9fe385b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/galaxy/jobs/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,13 @@ def __check_jobs_at_startup(self):
the database and requeues or cleans up as necessary. Only run as the job handler starts.
In case the activation is enforced it will filter out the jobs of inactive users.
"""
with self.sa_session() as session, session.begin():
try:
for job in get_jobs_to_check_at_startup(session, self.track_jobs_in_database, self.app.config):
with session.begin_nested():
self._check_job_at_startup(job)
finally:
with self.sa_session() as session:
for job in get_jobs_to_check_at_startup(session, self.track_jobs_in_database, self.app.config):
try:
self._check_job_at_startup(job)
except Exception:
log.exception("Error while recovering job %s during application startup.", job.id)
with transaction(session):
session.commit()

def _check_job_at_startup(self, job):
Expand Down

0 comments on commit 9fe385b

Please sign in to comment.