mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 02:49:12 +08:00
perf: increase selector timeout (#2)
This commit is contained in:
parent
0c9b266790
commit
e5d5bc4e35
@ -208,7 +208,10 @@ class ThreadWorker(base.Worker):
|
||||
# can we accept more connections?
|
||||
if self.nr_conns < self.worker_connections:
|
||||
# wait for an event
|
||||
events = self.poller.select(1.0)
|
||||
select_timeout = self.timeout or 1.0
|
||||
if self._keep:
|
||||
select_timeout = min(select_timeout, self.cfg.keepalive)
|
||||
events = self.poller.select(select_timeout)
|
||||
for key, _ in events:
|
||||
callback = key.data
|
||||
callback(key.fileobj)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user