changeset 137:989ada5c5cbb

fs2: use NullPool class for sqlite db connection pool, fix #4 - thanks to Matt Maker http://www.sqlalchemy.org/trac/browser/lib/sqlalchemy/dialects/sqlite/pysqlite.py#L96 http://www.sqlalchemy.org/docs/core/pooling.html
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 20 Mar 2011 14:45:47 +0100
parents 13bce99cba0b
children eade7d9989a1
files MoinMoin/storage/backends/fs2.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/storage/backends/fs2.py	Sun Mar 20 02:41:47 2011 +0100
+++ b/MoinMoin/storage/backends/fs2.py	Sun Mar 20 14:45:47 2011 +0100
@@ -22,6 +22,7 @@
 
 from sqlalchemy import create_engine, MetaData, Table, Column, String, Unicode, Integer
 from sqlalchemy.exceptions import IntegrityError
+from sqlalchemy.pool import NullPool
 
 from werkzeug import cached_property
 
@@ -121,7 +122,7 @@
                 if err.errno != errno.EEXIST:
                     raise BackendError(str(err))
 
-        engine = create_engine('sqlite:///%s' % self._make_path('index.db'), echo=False)
+        engine = create_engine('sqlite:///%s' % self._make_path('index.db'), poolclass=NullPool, echo=False)
         metadata = MetaData()
         metadata.bind = engine