[Checkins] SVN: Sandbox/gotcha/z3c.taskqueue/src/z3c/taskqueue/baseservice.py better to log service path than name

Godefroid Chapelle gotcha at bubblenet.be
Wed Apr 21 17:58:21 EDT 2010


Log message for revision 111247:
  better to log service path than name

Changed:
  U   Sandbox/gotcha/z3c.taskqueue/src/z3c/taskqueue/baseservice.py

-=-
Modified: Sandbox/gotcha/z3c.taskqueue/src/z3c/taskqueue/baseservice.py
===================================================================
--- Sandbox/gotcha/z3c.taskqueue/src/z3c/taskqueue/baseservice.py	2010-04-21 21:33:56 UTC (rev 111246)
+++ Sandbox/gotcha/z3c.taskqueue/src/z3c/taskqueue/baseservice.py	2010-04-21 21:58:20 UTC (rev 111247)
@@ -294,11 +294,12 @@
             self._scheduledQueue = zc.queue.PersistentQueue()
         # Create the path to the service within the DB.
         servicePath = self.getServicePath()
-        log.info('starting service %s' % self.__name__)
+        log.info('starting service %s' % ".".join(servicePath))
         # Start the thread running the processor inside.
         processor = self.processorFactory(
             self._p_jar.db(), servicePath, **self.processorArguments)
-        thread = threading.Thread(target=processor, name=self._threadName())
+        threadName = self._threadName()
+        thread = threading.Thread(target=processor, name=threadName)
         thread.setDaemon(True)
         thread.running = True
         thread.start()
@@ -307,10 +308,11 @@
         """See interfaces.ITaskService"""
         if self.__name__ is None:
             return
-        name = self._threadName()
-        log.info('stopping service %s' % name)
+        servicePath = self.getServicePath()
+        log.info('stopping service %s' % ".".join(servicePath))
+        threadName = self._threadName()
         for thread in threading.enumerate():
-            if thread.getName() == name:
+            if thread.getName() == threadName:
                 thread.running = False
                 break
 



More information about the checkins mailing list