Mercurial > p > roundup > code
diff roundup/backends/back_metakit.py @ 2082:c091cacdc505
Finished implementation of session and one-time-key stores for RDBMS backends.
Refactored the API of sessions and their interaction with the
backend database a fair bit too.
Added some session tests. Nothing testing ageing yet, 'cos that's a pain
inna ass to test :)
Note: metakit backend still uses the *dbm implementation. It might
want to implement its own session store some day, as it'll be faster than
the *dbm one.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 18 Mar 2004 01:58:46 +0000 |
| parents | 2a4309450202 |
| children | 93f03c6714d8 |
line wrap: on
line diff
--- a/roundup/backends/back_metakit.py Wed Mar 17 22:01:37 2004 +0000 +++ b/roundup/backends/back_metakit.py Thu Mar 18 01:58:46 2004 +0000 @@ -1,4 +1,4 @@ -# $Id: back_metakit.py,v 1.61 2004-03-12 05:36:26 richard Exp $ +# $Id: back_metakit.py,v 1.62 2004-03-18 01:58:45 richard Exp $ '''Metakit backend for Roundup, originally by Gordon McMillan. Known Current Bugs: @@ -43,7 +43,7 @@ from roundup import hyperdb, date, password, roundupdb, security import metakit -from sessions import Sessions, OneTimeKeys +from sessions_dbm import Sessions, OneTimeKeys import re, marshal, os, sys, time, calendar from roundup import indexer import locking @@ -81,8 +81,6 @@ self.lockfile = None self._db = self.__open() self.indexer = Indexer(self.config.DATABASE, self._db) - self.sessions = Sessions(self.config) - self.otks = OneTimeKeys(self.config) self.security = security.Security(self) os.umask(0002) @@ -101,6 +99,12 @@ klass.index(nodeid) self.indexer.save_index() + def getSessionManager(self): + return Sessions(self) + + def getOTKManager(self): + return OneTimeKeys(self) + # --- defined in ping's spec def __getattr__(self, classname): if classname == 'transactions':
