Skip to content
Snippets Groups Projects
Commit 689943c7 authored by ale's avatar ale
Browse files

set pool_recycle option on create_engine()

parent 7a26577c
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,7 @@ class SetTextFactory(PoolListener):
def init_db(uri):
from djrandom.model import mp3, playlist
engine = create_engine(uri, listeners=[SetTextFactory()])
engine = create_engine(uri, listeners=[SetTextFactory()],
pool_recycle=1800)
Session.configure(bind=engine)
Base.metadata.create_all(engine)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment