mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Fix bug in Arbiter.manage_workers.
My fix yesterday was broken when sorting workers. Thanks to Sabin Iacob for the report.
This commit is contained in:
parent
6d69509bb6
commit
0923a52171
@ -420,7 +420,7 @@ class Arbiter(object):
|
|||||||
self.spawn_workers()
|
self.spawn_workers()
|
||||||
|
|
||||||
workers = self.WORKERS.items()
|
workers = self.WORKERS.items()
|
||||||
workers.sort(key=lambda w: w.age)
|
workers.sort(key=lambda w: w[1].age)
|
||||||
while len(workers) > self.num_workers:
|
while len(workers) > self.num_workers:
|
||||||
(pid, _) = workers.pop(0)
|
(pid, _) = workers.pop(0)
|
||||||
self.kill_worker(pid, signal.SIGQUIT)
|
self.kill_worker(pid, signal.SIGQUIT)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user