X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-database.git/blobdiff_plain/fe3cf67c45ba77d082eeadfc191d627b43373cc1..4fc8b53bdc8a05d9f1e1a0d079d558b50367ebef:/python/database/__init__.py diff --git a/python/database/__init__.py b/python/database/__init__.py index 5eeb3c5..b3dd61c 100644 --- a/python/database/__init__.py +++ b/python/database/__init__.py @@ -4,4 +4,6 @@ import sqlalchemy def connect(uri = config.db.uri): """ Connect to a given database URI""" - meta.bind = sqlalchemy.create_engine(uri) + engine = sqlalchemy.create_engine(uri, pool_timeout=5) + meta.bind = engine + session.configure(bind=engine)