[Erp5-report] r25007 - /erp5/trunk/products/TimerService/TimerService.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Jan 5 03:47:27 CET 2009
Author: yusei
Date: Mon Jan 5 03:47:26 2009
New Revision: 25007
URL: http://svn.erp5.org?rev=25007&view=rev
Log:
Fixed a bug which disable all subscribers includes existing ones.
Modified:
erp5/trunk/products/TimerService/TimerService.py
Modified: erp5/trunk/products/TimerService/TimerService.py
URL: http://svn.erp5.org/erp5/trunk/products/TimerService/TimerService.py?rev=25007&r1=25006&r2=25007&view=diff
==============================================================================
--- erp5/trunk/products/TimerService/TimerService.py [utf8] (original)
+++ erp5/trunk/products/TimerService/TimerService.py [utf8] Mon Jan 5 03:47:26 2009
@@ -1,4 +1,4 @@
-# -*- coding: UTF-8 -*-
+# -*- coding: utf-8 -*-
# -*- Mode: Python; py-indent-offset: 4 -*-
# Authors: Nik Kim <fafhrd at legco.biz>
__version__ = '$Revision: 1.3 $'[11:-2]
@@ -9,7 +9,7 @@
from OFS.SimpleItem import SimpleItem
from OFS.PropertyManager import PropertyManager
-from zLOG import LOG, INFO, ERROR
+from zLOG import LOG, ERROR
from AccessControl import ClassSecurityInfo, Permissions
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
@@ -54,11 +54,12 @@
def process_shutdown(self, phase, time_in_phase):
""" """
subscriptions = []
- try:
- subscriptions = [self.unrestrictedTraverse(path)
- for path in self._subscribers]
- except KeyError:
- pass
+ for path in self._subscribers:
+ try:
+ subscriptions.append(self.unrestrictedTraverse(path))
+ except KeyError:
+ pass
+
for subscriber in subscriptions:
process_shutdown = getattr(subscriber, 'process_shutdown', None)
if process_shutdown is not None:
@@ -84,11 +85,11 @@
# Service start to 'ping' the portal before the zope transaction in
# which the portal is created is commited.
subscriptions = []
- try:
- subscriptions = [self.unrestrictedTraverse(path)
- for path in self._subscribers]
- except KeyError:
- pass
+ for path in self._subscribers:
+ try:
+ subscriptions.append(self.unrestrictedTraverse(path))
+ except KeyError:
+ pass
tick = time.time()
prev_tick = tick - interval
More information about the Erp5-report
mailing list