mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 15:21:13 +03:00
use a computed inventory field for task impact math
see: https://github.com/ansible/tower/issues/4022
This commit is contained in:
parent
f0198105c4
commit
f1b4e24833
@ -634,7 +634,7 @@ class Job(UnifiedJob, JobOptions, SurveyJobMixin, JobNotificationMixin, TaskMana
|
||||
else:
|
||||
# If for some reason we can't count the hosts then lets assume the impact as forks
|
||||
if self.inventory is not None:
|
||||
count_hosts = self.inventory.hosts.count()
|
||||
count_hosts = self.inventory.total_hosts
|
||||
if self.job_slice_count > 1:
|
||||
# Integer division intentional
|
||||
count_hosts = (count_hosts + self.job_slice_count - self.job_slice_number) // self.job_slice_count
|
||||
|
Loading…
Reference in New Issue
Block a user