Adds cpu affinity for the workers. Courtesy of the optional psutil module.

This commit is contained in:
Ilan
2015-07-15 19:53:13 +02:00
parent 507ccf7e11
commit 2d0820e80b
6 changed files with 92 additions and 3 deletions
+1 -2
View File
@@ -123,8 +123,7 @@ class Stat(Status):
self.task_q_size = sentinel.task_queue.qsize()
if sentinel.pusher:
self.pusher = sentinel.pusher.pid
for w in sentinel.pool:
self.workers.append(w.pid)
self.workers = [w.pid for w in sentinel.pool]
def uptime(self):
return (timezone.now() - self.tob).total_seconds()