aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/send-receive.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/misc/send-receive.py b/misc/send-receive.py
index 4900dc6..c15e12a 100644
--- a/misc/send-receive.py
+++ b/misc/send-receive.py
@@ -520,7 +520,9 @@ if gpgbin:
patatt.GPGBIN = gpgbin
dburl = parser['main'].get('dburl')
-engine = sa.create_engine(dburl)
+# By default, recycle db connections after 5 min
+db_pool_recycle = parser['main'].getint('dbpoolrecycle', 300)
+engine = sa.create_engine(dburl, pool_recycle=db_pool_recycle)
srl = SendReceiveListener(engine, parser)
app = falcon.App()
mp = os.getenv('MOUNTPOINT', '/_b4_submit')