mirror of
https://github.com/frappe/gunicorn.git
synced 2026-07-01 18:21:30 +08:00
fix: print exception to stderr on worker boot failure
When a worker fails to boot, the exception is now printed to stderr (in addition to being logged), consistent with AppImportError handling. This makes boot failures more visible to users. Closes #2933
This commit is contained in:
parent
56abeaf105
commit
19d07bd4af
@ -631,8 +631,10 @@ class Arbiter:
|
||||
print("%s" % e, file=sys.stderr)
|
||||
sys.stderr.flush()
|
||||
sys.exit(self.APP_LOAD_ERROR)
|
||||
except Exception:
|
||||
except Exception as e:
|
||||
self.log.exception("Exception in worker process")
|
||||
print("%s" % e, file=sys.stderr)
|
||||
sys.stderr.flush()
|
||||
if not worker.booted:
|
||||
sys.exit(self.WORKER_BOOT_ERROR)
|
||||
sys.exit(-1)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user