mirror of
https://github.com/ansible/awx.git
synced 2026-07-10 15:58:05 -02:30
Adding capacity docs
Updating capacity for callback jobs to include parent process impact
This commit is contained in:
@@ -620,7 +620,7 @@ class Job(UnifiedJob, JobOptions, SurveyJobMixin, JobNotificationMixin, TaskMana
|
||||
# NOTE: We sorta have to assume the host count matches and that forks default to 5
|
||||
from awx.main.models.inventory import Host
|
||||
if self.launch_type == 'callback':
|
||||
count_hosts = 1
|
||||
count_hosts = 2
|
||||
else:
|
||||
count_hosts = Host.objects.filter(inventory__jobs__pk=self.pk).count()
|
||||
return min(count_hosts, 5 if self.forks == 0 else self.forks) + 1
|
||||
|
||||
Reference in New Issue
Block a user