mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-14 18:11:23 +01:00
Close db connection at end
This commit is contained in:
parent
5fa1e43e2a
commit
d400c022c1
@ -34,10 +34,11 @@ class DatabaseInterface(object):
|
||||
session = Session()
|
||||
try:
|
||||
yield session
|
||||
session.commit()
|
||||
except:
|
||||
session.rollback()
|
||||
finally:
|
||||
session.commit()
|
||||
session.close()
|
||||
|
||||
async def push_message(self, message):
|
||||
if message.guild:
|
||||
|
Loading…
Reference in New Issue
Block a user