mirror of
https://github.com/ansible/awx.git
synced 2026-01-10 15:32:07 -03:30
adjust the default capacity_adjustment to 0.75
This commit is contained in:
parent
01eb162378
commit
c8efa82aca
@ -160,7 +160,7 @@ class Instance(HasPolicyEditsMixin, BaseModel):
|
||||
default=100,
|
||||
editable=False,
|
||||
)
|
||||
capacity_adjustment = models.DecimalField(default=Decimal(1.0), max_digits=3, decimal_places=2, validators=[MinValueValidator(Decimal(0.0))])
|
||||
capacity_adjustment = models.DecimalField(default=Decimal(0.75), max_digits=3, decimal_places=2, validators=[MinValueValidator(Decimal(0.0))])
|
||||
enabled = models.BooleanField(default=True)
|
||||
managed_by_policy = models.BooleanField(default=True)
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ def test_dispatcher_max_workers_reserve(settings, fake_redis):
|
||||
plus reserve worker count
|
||||
"""
|
||||
with override_settings(**settings):
|
||||
i = Instance.objects.create(hostname='test-1', node_type='hybrid')
|
||||
i = Instance.objects.create(hostname='test-1', node_type='hybrid', capacity_adjustment=1.0)
|
||||
i.local_health_check()
|
||||
|
||||
assert get_auto_max_workers() == i.capacity + 7, (i.cpu, i.memory, i.cpu_capacity, i.mem_capacity)
|
||||
|
||||
@ -44,8 +44,8 @@ def test_job_capacity_and_with_inactive_node():
|
||||
i = Instance.objects.create(hostname='test-1')
|
||||
i.save_health_data('18.0.1', 2, 8000)
|
||||
assert i.enabled is True
|
||||
assert i.capacity_adjustment == 1.0
|
||||
assert i.capacity == 62
|
||||
assert i.capacity_adjustment == 0.75
|
||||
assert i.capacity == 48.5
|
||||
i.enabled = False
|
||||
i.save()
|
||||
with override_settings(CLUSTER_HOST_ID=i.hostname):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user