don't try to reopen files on initial startup. fix #358

This commit is contained in:
benoitc 2012-06-24 17:25:43 +02:00
parent ace4a0d6ec
commit 67bd75f7b3

View File

@ -87,7 +87,8 @@ class Arbiter(object):
self.log = self.cfg.logger_class(app.cfg)
# reopen files
self.log.reopen_files()
if 'GUNICORN_FD' in os.environ:
self.log.reopen_files()
self.address = self.cfg.address
self.num_workers = self.cfg.workers
@ -353,6 +354,9 @@ class Arbiter(object):
self.app.reload()
self.setup(self.app)
# reopen log files
self.log.reopen_files()
# do we need to change listener ?
if old_address != self.cfg.address:
self.LISTENER.close()