mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-03 21:08:11 +08:00
Shares Sentinel broker with Monitor
This commit is contained in:
+2
-2
@@ -171,7 +171,7 @@ class Sentinel(object):
|
|||||||
self.spawn_process(worker, self.task_queue, self.result_queue, Value('f', -1), self.timeout)
|
self.spawn_process(worker, self.task_queue, self.result_queue, Value('f', -1), self.timeout)
|
||||||
|
|
||||||
def spawn_monitor(self):
|
def spawn_monitor(self):
|
||||||
return self.spawn_process(monitor, self.result_queue)
|
return self.spawn_process(monitor, self.result_queue, self.broker)
|
||||||
|
|
||||||
def reincarnate(self, process):
|
def reincarnate(self, process):
|
||||||
"""
|
"""
|
||||||
@@ -494,7 +494,7 @@ def set_cpu_affinity(n, process_ids, actual=not Conf.TESTING):
|
|||||||
"""
|
"""
|
||||||
Sets the cpu affinity for the supplied processes.
|
Sets the cpu affinity for the supplied processes.
|
||||||
Requires the optional psutil module.
|
Requires the optional psutil module.
|
||||||
:param int n:
|
:param int n: affinity
|
||||||
:param list process_ids: a list of pids
|
:param list process_ids: a list of pids
|
||||||
:param bool actual: Test workaround for Travis not supporting cpu affinity
|
:param bool actual: Test workaround for Travis not supporting cpu affinity
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user