mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
Merge pull request #2707 from ryanpetrello/min-max-workers
prevent the dispatcher from using a nonsensical max_workers value Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
@@ -296,6 +296,10 @@ class AutoscalePool(WorkerPool):
|
|||||||
# 5 workers per GB of total memory
|
# 5 workers per GB of total memory
|
||||||
self.max_workers = (total_memory_gb * 5)
|
self.max_workers = (total_memory_gb * 5)
|
||||||
|
|
||||||
|
# max workers can't be less than min_workers
|
||||||
|
self.max_workers = max(self.min_workers, self.max_workers)
|
||||||
|
logger.warning(self.debug_meta)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def should_grow(self):
|
def should_grow(self):
|
||||||
if len(self.workers) < self.min_workers:
|
if len(self.workers) < self.min_workers:
|
||||||
|
|||||||
Reference in New Issue
Block a user