/siteinfo page: display information about the names of the running threads stable
authorAlexandre Fayolle <alexandre.fayolle@logilab.fr>
Sat, 29 May 2010 09:54:07 +0000
branchstable
changeset 5601 92cf309672ca
parent 5600 a826996875e7
child 5602 277b15d6d3ed
/siteinfo page: display information about the names of the running threads
server/repository.py
server/utils.py
--- a/server/repository.py	Sat May 29 09:52:31 2010 +0000
+++ b/server/repository.py	Sat May 29 09:54:07 2010 +0000
@@ -382,6 +382,7 @@
         results['nb_active_threads'] = threading.activeCount()
         results['looping_tasks'] = ', '.join(str(t) for t in self._looping_tasks)
         results['available_pools'] = self._available_pools.qsize()
+        results['threads'] = ', '.join(sorted(str(t) for t in threading.enumerate()))
         return results
 
     def _login_from_email(self, login):
--- a/server/utils.py	Sat May 29 09:52:31 2010 +0000
+++ b/server/utils.py	Sat May 29 09:54:07 2010 +0000
@@ -137,6 +137,7 @@
 
     def start(self):
         self._t = Timer(self.interval, self.func)
+        self._t.setName('%s-%s[%d]' % (self._t.getName(), self.name, self.interval))
         self._t.start()
 
     def cancel(self):