From bd2924d2bcb670f02a51a2df57030c6612928c35 Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 16 May 2023 08:29:42 +0300 Subject: [PATCH] stop hanging db transactions --- files/helpers/const_stateful.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/files/helpers/const_stateful.py b/files/helpers/const_stateful.py index d2a7df1cf..71158ef3a 100644 --- a/files/helpers/const_stateful.py +++ b/files/helpers/const_stateful.py @@ -32,6 +32,9 @@ def _initialize_marseys(db:scoped_session): SNAPPY_KONGS = db.query(Emoji.name).filter(Emoji.kind=="Donkey Kong", Emoji.submitter_id==None).all() SNAPPY_KONGS = [f':#{x[0]}:' for x in SNAPPY_KONGS] + db.commit() + db.close() + def _initialize_snappy_marseys_and_quotes(): global SNAPPY_MARSEYS, SNAPPY_QUOTES