Mercurial > p > roundup > code
diff roundup/instance.py @ 4211:61cf00ca920a
Process each message through the mail gateway as a separate transaction.
The mail-gateway used to process messages fetched, e.g., via imap in a
single big transaction. Now we process each message coming in via the
mail-gateway in its own transaction. Regression-tests passed.
See also discussion:
http://thread.gmane.org/gmane.comp.bug-tracking.roundup.user/9500
| author | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
|---|---|
| date | Tue, 14 Jul 2009 09:10:43 +0000 |
| parents | bbab97f8ffb2 |
| children | 2b75274936bc |
line wrap: on
line diff
--- a/roundup/instance.py Mon Jul 13 16:00:35 2009 +0000 +++ b/roundup/instance.py Tue Jul 14 09:10:43 2009 +0000 @@ -46,6 +46,10 @@ """ self.tracker_home = tracker_home self.optimize = optimize + # if set, call schema_hook after executing schema.py will get + # same variables (in particular db) as schema.py main purpose is + # for regression tests + self.schema_hook = None self.config = configuration.CoreConfig(tracker_home) self.actions = {} self.cgi_actions = {} @@ -106,6 +110,8 @@ if self.optimize: # execute preloaded schema object exec(self.schema, vars) + if callable (self.schema_hook): + self.schema_hook(**vars) # use preloaded detectors detectors = self.detectors else: @@ -114,6 +120,8 @@ sys.path.insert(1, libdir) # execute the schema file self._load_python('schema.py', vars) + if callable (self.schema_hook): + self.schema_hook(**vars) # reload extensions and detectors for extension in self.get_extensions('extensions'): extension(self)
