Drop expunge_all() call in WebTransactionRequest

We're always getting a clean request_id scoped session, so this
shouldn't be necessary. It shows up in memray traces as allocating
memory that doesn't get freed (which I don't understand, it's
WeakInstanceDict instances).
This commit is contained in:
mvdbeek
2023-08-27 16:25:33 +02:00
parent 8d5feb4fa1
commit cf8fc114a0
2 changed files with 0 additions and 12 deletions
-11
View File
@@ -159,17 +159,6 @@ class ProvidesAppContext:
"""
return self.app.model.session
def expunge_all(self):
"""Expunge all the objects in Galaxy's SQLAlchemy sessions."""
app = self.app
context = app.model.context
context.expunge_all()
# This is a bit hacky, should refctor this. Maybe refactor to app -> expunge_all()
if hasattr(app, "install_model"):
install_model = app.install_model
if install_model != app.model:
install_model.context.expunge_all()
def get_toolbox(self):
"""Returns the application toolbox.
-1
View File
@@ -308,7 +308,6 @@ class GalaxyWebTransaction(base.DefaultWebTransaction, context.ProvidesHistoryCo
self.user_manager = app[UserManager]
self.session_manager = app[GalaxySessionManager]
super().__init__(environ)
self.expunge_all()
config = self.app.config
self.debug = asbool(config.get("debug", False))
x_frame_options = getattr(config, "x_frame_options", None)