Mercurial > p > roundup > code
diff roundup/backends/back_anydbm.py @ 1840:91a4619b1a14
hyperdb grows a refresh_database() method.
There will be a future roundup-admin command to invoke this.
XXXX Unit tests do _not_ cover large slabs of the hyperdb backend code,
it seems. :-(
| author | Anthony Baxter <anthonybaxter@users.sourceforge.net> |
|---|---|
| date | Tue, 07 Oct 2003 11:58:58 +0000 |
| parents | bd127cafe3a8 |
| children | 9445caec3ff5 |
line wrap: on
line diff
--- a/roundup/backends/back_anydbm.py Tue Oct 07 08:52:12 2003 +0000 +++ b/roundup/backends/back_anydbm.py Tue Oct 07 11:58:58 2003 +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.128 2003-09-14 18:55:37 jlgijsbers Exp $ +#$Id: back_anydbm.py,v 1.129 2003-10-07 11:58:57 anthonybaxter 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 @@ -98,6 +98,10 @@ if self.indexer.should_reindex(): self.reindex() + def refresh_database(self): + "Rebuild the database" + self.reindex() + def reindex(self): for klass in self.classes.values(): for nodeid in klass.list():
