mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
load after forking
This commit is contained in:
parent
776b158683
commit
f7c91e7e86
@ -33,8 +33,6 @@ class Worker(object):
|
||||
self.app = app
|
||||
self.timeout = timeout
|
||||
self.cfg = cfg
|
||||
if not self.cfg.preload_app:
|
||||
self.app = app.load()
|
||||
|
||||
self.nr = 0
|
||||
self.alive = True
|
||||
@ -93,6 +91,10 @@ class Worker(object):
|
||||
util.close_on_exec(self.fd)
|
||||
self.init_signals()
|
||||
|
||||
# do we need to load the app
|
||||
if not self.cfg.preload_app:
|
||||
self.app = self.app.load()
|
||||
|
||||
# Enter main run loop
|
||||
self.run()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user