load after forking

This commit is contained in:
benoitc 2010-05-22 20:07:08 +02:00
parent 776b158683
commit f7c91e7e86

View File

@ -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()