summaryrefslogtreecommitdiff
path: root/mailman/database/__init__.py
diff options
context:
space:
mode:
authorBarry Warsaw2008-03-12 21:22:48 -0400
committerBarry Warsaw2008-03-12 21:22:48 -0400
commit276df8d3a8e89013490d7048b21ddc87e75a38ac (patch)
tree3a9a4e50a7c6a7ee2829d37127a5ff4522089a62 /mailman/database/__init__.py
parent91f84edd80b4470cb0c9dfca30890388af6daec8 (diff)
downloadmailman-276df8d3a8e89013490d7048b21ddc87e75a38ac.tar.gz
mailman-276df8d3a8e89013490d7048b21ddc87e75a38ac.tar.zst
mailman-276df8d3a8e89013490d7048b21ddc87e75a38ac.zip
Sprinkle a few more transaction API calls around to make sure the database
doesn't remain in a locked state, hosing other processes. - Move a commit to the end of StockDatabase._create() - Add an abort to the Exception clause if there's an error while dequeuing - Add an abort to the Exception clause if there's an error while finishing - Add a commit after _doperiodic() and _shortcircuit() is called. - Add a commit to the end of cleaning_teardown() in test_documentation.py This now makes all the tests pass even when all of them are run.
Diffstat (limited to 'mailman/database/__init__.py')
-rw-r--r--mailman/database/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mailman/database/__init__.py b/mailman/database/__init__.py
index dabe70c79..1f73071c0 100644
--- a/mailman/database/__init__.py
+++ b/mailman/database/__init__.py
@@ -121,7 +121,6 @@ class StockDatabase:
sql = fp.read()
for statement in sql.split(';'):
store.execute(statement + ';')
- store.commit()
# Validate schema version.
v = store.find(Version, component=u'schema').one()
if not v:
@@ -133,6 +132,7 @@ class StockDatabase:
# XXX Update schema
raise SchemaVersionMismatchError(v.version)
self.store = store
+ store.commit()
def _reset(self):
"""See `IDatabase`."""