mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
don't try to reopen files on initial startup. fix #358
This commit is contained in:
parent
ace4a0d6ec
commit
67bd75f7b3
@ -87,7 +87,8 @@ class Arbiter(object):
|
|||||||
self.log = self.cfg.logger_class(app.cfg)
|
self.log = self.cfg.logger_class(app.cfg)
|
||||||
|
|
||||||
# reopen files
|
# reopen files
|
||||||
self.log.reopen_files()
|
if 'GUNICORN_FD' in os.environ:
|
||||||
|
self.log.reopen_files()
|
||||||
|
|
||||||
self.address = self.cfg.address
|
self.address = self.cfg.address
|
||||||
self.num_workers = self.cfg.workers
|
self.num_workers = self.cfg.workers
|
||||||
@ -353,6 +354,9 @@ class Arbiter(object):
|
|||||||
self.app.reload()
|
self.app.reload()
|
||||||
self.setup(self.app)
|
self.setup(self.app)
|
||||||
|
|
||||||
|
# reopen log files
|
||||||
|
self.log.reopen_files()
|
||||||
|
|
||||||
# do we need to change listener ?
|
# do we need to change listener ?
|
||||||
if old_address != self.cfg.address:
|
if old_address != self.cfg.address:
|
||||||
self.LISTENER.close()
|
self.LISTENER.close()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user