mirror of
https://github.com/django-q2/django-q2.git
synced 2026-09-24 07:48:12 +08:00
added to translations
fixed _ conflict
This commit is contained in:
+5
-5
@@ -207,7 +207,7 @@ class Sentinel(object):
|
||||
self.pool = []
|
||||
Stat(self).save()
|
||||
# spawn worker pool
|
||||
for _ in range(self.pool_size):
|
||||
for __ in range(self.pool_size):
|
||||
self.spawn_worker()
|
||||
# spawn auxiliary
|
||||
self.monitor = self.spawn_monitor()
|
||||
@@ -254,7 +254,7 @@ class Sentinel(object):
|
||||
def stop(self):
|
||||
Stat(self).save()
|
||||
name = current_process().name
|
||||
logger.info('{} stopping cluster processes'.format(name))
|
||||
logger.info(_('{} stopping cluster processes').format(name))
|
||||
# Stopping pusher
|
||||
self.event_out.set()
|
||||
# Wait for it to stop
|
||||
@@ -262,7 +262,7 @@ class Sentinel(object):
|
||||
sleep(0.1)
|
||||
Stat(self).save()
|
||||
# Put poison pills in the queue
|
||||
for _ in range(len(self.pool)):
|
||||
for __ in range(len(self.pool)):
|
||||
self.task_queue.put('STOP')
|
||||
self.task_queue.close()
|
||||
# wait for the task queue to empty
|
||||
@@ -279,7 +279,7 @@ class Sentinel(object):
|
||||
self.result_queue.close()
|
||||
# Wait for the result queue to empty
|
||||
self.result_queue.join_thread()
|
||||
logger.info('{} waiting for the monitor.'.format(name))
|
||||
logger.info(_('{} waiting for the monitor.').format(name))
|
||||
# Wait for everything to close or time out
|
||||
count = 0
|
||||
if not self.timeout:
|
||||
@@ -510,4 +510,4 @@ def set_cpu_affinity(n, process_ids, actual=not Conf.TESTING):
|
||||
p = psutil.Process(pid)
|
||||
if actual:
|
||||
p.cpu_affinity(affinity)
|
||||
logger.info('{} will use cpu {}'.format(pid, affinity))
|
||||
logger.info(_('{} will use cpu {}').format(pid, affinity))
|
||||
|
||||
Reference in New Issue
Block a user