mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
make sure to remove the signal from the worker pipe
The signal was never removed from the pie which was always waking up the worker triggering a CPU spike. fix #1269
This commit is contained in:
parent
f8e14a53b2
commit
39f62ac66b
@ -254,4 +254,4 @@ class Worker(object):
|
||||
|
||||
def handle_winch(self, sig, fname):
|
||||
# Ignore SIGWINCH in worker. Fixes a crash on OpenBSD.
|
||||
return
|
||||
self.log.debug("worker: SIGWINCH ignored.")
|
||||
|
||||
@ -34,6 +34,8 @@ class SyncWorker(base.Worker):
|
||||
self.notify()
|
||||
ret = select.select(self.wait_fds, [], [], timeout)
|
||||
if ret[0]:
|
||||
if self.PIPE[0] in ret[0]:
|
||||
os.read(self.PIPE[0], 1)
|
||||
return ret[0]
|
||||
|
||||
except select.error as e:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user