From 7e25fbcc4c76eb8f67341ff82b47e875f0243280 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Sat, 4 Oct 2008 23:23:10 -0400 Subject: [PATCH] Re-establish the database connection if the server goes AWOL svn path=/trunk/packages/sipb-xen-database/; revision=1041 --- debian/changelog | 6 ++++++ python/database/__init__.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 74ab33d..2af5b40 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +sipb-xen-database (10.28) unstable; urgency=low + + * Re-establish the database connection if the server goes AWOL + + -- Evan Broder Sat, 04 Oct 2008 23:19:59 -0400 + sipb-xen-database (10.27) unstable; urgency=low * Update sipb-database to work with newer SQLAlchemy and Xen diff --git a/python/database/__init__.py b/python/database/__init__.py index 258c4d4..b3dd61c 100644 --- a/python/database/__init__.py +++ b/python/database/__init__.py @@ -4,6 +4,6 @@ import sqlalchemy def connect(uri = config.db.uri): """ Connect to a given database URI""" - engine = sqlalchemy.create_engine(uri) + engine = sqlalchemy.create_engine(uri, pool_timeout=5) meta.bind = engine session.configure(bind=engine) -- 1.7.9.5