From f36db360d5d6f3f1ac2d1c0784a8757dbce49109 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Tue, 26 Mar 2002 22:26:10 +0000 Subject: _snooze(): Use self.SLEEPTIME instead of mm_cfg.QRUNNER_SLEEP_TIME for additional indirection that's overridden by the BounceRunner. Defaults to QRUNNER_SLEEP_TIME for backwards compatibility. --- Mailman/Queue/Runner.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Mailman/Queue/Runner.py b/Mailman/Queue/Runner.py index 160ccd9dd..540f6c0a4 100644 --- a/Mailman/Queue/Runner.py +++ b/Mailman/Queue/Runner.py @@ -35,6 +35,8 @@ from Mailman.Logging.Syslog import syslog class Runner: + SLEEPTIME = mm_cfg.QRUNNER_SLEEP_TIME + def __init__(self, slice=None, numslices=1): self._kids = {} # Create our own switchboard. Don't use the switchboard cache because @@ -228,9 +230,9 @@ class Runner: processing loop had no work to do (i.e. there were no messages in it's little slice of hash space). """ - if mm_cfg.QRUNNER_SLEEP_TIME <= 0: + if self.SLEEPTIME <= 0: return - time.sleep(mm_cfg.QRUNNER_SLEEP_TIME) + time.sleep(self.SLEEPTIME) def _shortcircuit(self): """Return a true value if the individual file processing loop should -- cgit v1.3.1