mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
make sure conf is available when spawning workers. Also since run
already manage_workers, no need to run this function in reload.
This commit is contained in:
parent
d5b76ac651
commit
ebca25dddb
@ -321,8 +321,9 @@ class Arbiter(object):
|
|||||||
def reload(self):
|
def reload(self):
|
||||||
# reload conf
|
# reload conf
|
||||||
self.app.reload()
|
self.app.reload()
|
||||||
|
self.setup(self.app)
|
||||||
|
|
||||||
# spawn new workers
|
# spawn new workers with new app & conf
|
||||||
for i in range(self.app.cfg.workers):
|
for i in range(self.app.cfg.workers):
|
||||||
self.spawn_worker()
|
self.spawn_worker()
|
||||||
|
|
||||||
@ -330,9 +331,6 @@ class Arbiter(object):
|
|||||||
if self.pidfile is not None:
|
if self.pidfile is not None:
|
||||||
self.pidfile.unlink()
|
self.pidfile.unlink()
|
||||||
|
|
||||||
self.setup(self.app)
|
|
||||||
self.manage_workers()
|
|
||||||
|
|
||||||
return self.run()
|
return self.run()
|
||||||
|
|
||||||
def murder_workers(self):
|
def murder_workers(self):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user