Skip to content

Commit

Permalink
Ensure session is closed on TS Registry load
Browse files Browse the repository at this point in the history
Same as prev. commit: otherwise db locks are left
  • Loading branch information
jdavcs committed Mar 4, 2024
1 parent 0468e1c commit 72f7697
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/tool_shed/repository_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ def __init__(self, app):
self.viewable_suites_by_category = {}
self.viewable_valid_repositories_and_suites_by_category = {}
self.viewable_valid_suites_by_category = {}
self.load_viewable_repositories_and_suites_by_category()
self.load_repository_and_suite_tuples()
self.load()

def load(self):
with self.sa_session.begin():
self.load_viewable_repositories_and_suites_by_category()
self.load_repository_and_suite_tuples()

def add_category_entry(self, category):
category_name = str(category.name)
Expand Down

0 comments on commit 72f7697

Please sign in to comment.