Close db connection at end

This commit is contained in:
Jeremy Zhang 2018-03-26 15:35:31 +00:00
parent 5fa1e43e2a
commit d400c022c1

View File

@ -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: