Discord bot db pool recycle set

This commit is contained in:
Jeremy Zhang 2017-05-06 01:09:54 -07:00
parent b43d29bca5
commit e7e0c6e505

View File

@ -22,7 +22,7 @@ class DatabaseInterface(object):
async def connect(self, dburi):
async with threadpool():
self.engine = create_engine(dburi)
self.engine = create_engine(dburi, pool_recycle=250)
self._sessionmaker = sessionmaker(bind=self.engine, expire_on_commit=False)
@contextmanager