mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 04:31:21 -03: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:
commit
2f669685d8
@ -296,6 +296,10 @@ class AutoscalePool(WorkerPool):
|
||||
# 5 workers per GB of total memory
|
||||
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
|
||||
def should_grow(self):
|
||||
if len(self.workers) < self.min_workers:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user