mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Remove unnecessary call to dict keys method
This commit is contained in:
parent
e179dc2575
commit
59bf81cb58
@ -539,7 +539,7 @@ class Arbiter(object):
|
|||||||
Maintain the number of workers by spawning or killing
|
Maintain the number of workers by spawning or killing
|
||||||
as required.
|
as required.
|
||||||
"""
|
"""
|
||||||
if len(self.WORKERS.keys()) < self.num_workers:
|
if len(self.WORKERS) < self.num_workers:
|
||||||
self.spawn_workers()
|
self.spawn_workers()
|
||||||
|
|
||||||
workers = self.WORKERS.items()
|
workers = self.WORKERS.items()
|
||||||
@ -610,7 +610,7 @@ class Arbiter(object):
|
|||||||
of the master process.
|
of the master process.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
for _ in range(self.num_workers - len(self.WORKERS.keys())):
|
for _ in range(self.num_workers - len(self.WORKERS)):
|
||||||
self.spawn_worker()
|
self.spawn_worker()
|
||||||
time.sleep(0.1 * random.random())
|
time.sleep(0.1 * random.random())
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user