daemonize_workers option

This commit is contained in:
Yann Pomarede
2016-12-05 14:55:42 +01:00
parent 3b8199cb8f
commit aa667b40d4
3 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -147,7 +147,7 @@ class Sentinel(object):
p = Process(target=target, args=args)
p.daemon = True
if target == worker:
p.daemon = False
p.daemon = Conf.DAEMINIZE_WORKER
p.timer = args[2]
self.pool.append(p)
p.start()
+3
View File
@@ -91,6 +91,9 @@ class Conf(object):
# sensible default
WORKERS = 4
# Option to undaemonize the workers and allow them to spawn child processes
DAEMONIZE_WORKERS = conf.get('daemonize_workers', True)
# Maximum number of tasks that each cluster can work on
QUEUE_LIMIT = conf.get('queue_limit', int(WORKERS) ** 2)