Mercurial > p > roundup > code
diff roundup/backends/back_anydbm.py @ 3687:ff9f4ca42454
Postgres backend allows transaction collisions to be ignored when...
...committing clenup in the sessions database
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 29 Aug 2006 04:20:50 +0000 |
| parents | 193f316dbbe9 |
| children | bf2e9535da00 |
line wrap: on
line diff
--- a/roundup/backends/back_anydbm.py Sun Aug 27 11:34:12 2006 +0000 +++ b/roundup/backends/back_anydbm.py Tue Aug 29 04:20:50 2006 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -#$Id: back_anydbm.py,v 1.201 2006-08-21 12:19:48 schlatterbeck Exp $ +#$Id: back_anydbm.py,v 1.202 2006-08-29 04:20:50 richard Exp $ '''This module defines a backend that saves the hyperdatabase in a database chosen by anydbm. It is guaranteed to always be available in python versions >2.1.1 (the dumbdbm fallback in 2.1.1 and earlier has several @@ -590,8 +590,17 @@ # # Basic transaction support # - def commit(self): + def commit(self, fail_ok=False): ''' Commit the current transactions. + + Save all data changed since the database was opened or since the + last commit() or rollback(). + + fail_ok indicates that the commit is allowed to fail. This is used + in the web interface when committing cleaning of the session + database. We don't care if there's a concurrency issue there. + + The only backend this seems to affect is postgres. ''' logging.getLogger('hyperdb').info('commit %s transactions'%( len(self.transactions)))
