mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Fix silent exception in response code capture
This commit is contained in:
parent
89a3c96700
commit
4bf1e1d468
@ -478,9 +478,9 @@ class Arbiter(object):
|
||||
(pid, _) = workers.pop(0)
|
||||
self.kill_worker(pid, signal.SIGQUIT)
|
||||
|
||||
self.log.info("%d workers",
|
||||
self.log.info("{0} workers".format(len(workers)),
|
||||
extra={"metric": "gunicorn.workers",
|
||||
"value": len(self.WORKERS),
|
||||
"value": len(workers),
|
||||
"mtype": "gauge"})
|
||||
|
||||
def spawn_worker(self):
|
||||
|
||||
@ -84,7 +84,7 @@ class Statsd(Logger):
|
||||
duration_in_s = request_time.seconds + float(request_time.microseconds)/10**6
|
||||
self.histogram("gunicorn.request.duration", duration_in_s)
|
||||
self.increment("gunicorn.requests", 1)
|
||||
self.increment("gunicorn.request.status.%d" % int(resp.status), 1)
|
||||
self.increment("gunicorn.request.status.%d" % int(resp.status.split()[0]), 1)
|
||||
|
||||
# statsD methods
|
||||
# you can use those directly if you want
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user