[Checkins] SVN: Sandbox/gotcha/five.taskqueue/trunk/src/five/taskqueue/startup.py startServices filters which services to start based on which site they are sitting in
Godefroid Chapelle
cvs-admin at zope.org
Mon Nov 12 15:49:04 UTC 2012
Log message for revision 128246:
startServices filters which services to start based on which site they are sitting in
Changed:
U Sandbox/gotcha/five.taskqueue/trunk/src/five/taskqueue/startup.py
-=-
Modified: Sandbox/gotcha/five.taskqueue/trunk/src/five/taskqueue/startup.py
===================================================================
--- Sandbox/gotcha/five.taskqueue/trunk/src/five/taskqueue/startup.py 2012-11-12 15:24:22 UTC (rev 128245)
+++ Sandbox/gotcha/five.taskqueue/trunk/src/five/taskqueue/startup.py 2012-11-12 15:49:04 UTC (rev 128246)
@@ -9,21 +9,24 @@
log = logging.getLogger('five.taskqueue')
-def startServices(root_folder):
+def startServices(root_folder, siteName):
configuration = getTaskqueueConfiguration()
startSpecifications = getStartSpecifications(configuration)
- for siteName, serviceName in startSpecifications:
- log.debug('Starting service %s from site %s' % (serviceName, siteName))
+ for startSiteName, serviceName in startSpecifications:
+ if startSiteName != siteName:
+ continue
site = getSite(siteName, root_folder)
if site is None:
continue
+ log.debug('Starting service %s from site %s' % (serviceName, siteName))
service = startOneService(site, serviceName)
if service and not service.isProcessing():
msg = 'service %s from site %s was not started.'
log.warn(msg % (serviceName, siteName))
else:
- log.debug('Service %s from site %s started.' % (serviceName, siteName))
+ log.debug('Service %s from site %s started.' %
+ (serviceName, siteName))
def databaseOpened(event):
More information about the checkins
mailing list