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()
|
session = Session()
|
||||||
try:
|
try:
|
||||||
yield session
|
yield session
|
||||||
|
session.commit()
|
||||||
except:
|
except:
|
||||||
session.rollback()
|
session.rollback()
|
||||||
finally:
|
finally:
|
||||||
session.commit()
|
session.close()
|
||||||
|
|
||||||
async def push_message(self, message):
|
async def push_message(self, message):
|
||||||
if message.guild:
|
if message.guild:
|
||||||
|
Loading…
Reference in New Issue
Block a user