1
0
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:
Ryan Petrello 2019-12-06 12:56:18 -05:00 committed by AlanCoding
parent f0198105c4
commit f1b4e24833
No known key found for this signature in database
GPG Key ID: FD2C3C012A72926B

View File

@ -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