mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 06:51:10 +03:00
Merge pull request #4487 from ryanpetrello/many-groups-slowness
optimize a slow query in inventory script generation Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
commit
ad17bdc559
@ -309,7 +309,7 @@ class Inventory(CommonModelNameNotUnique, ResourceMixin, RelatedJobsMixin):
|
||||
|
||||
# Now use in-memory maps to build up group info.
|
||||
all_group_names = []
|
||||
for group in self.groups.only('name', 'id', 'variables'):
|
||||
for group in self.groups.only('name', 'id', 'variables', 'inventory_id'):
|
||||
group_info = dict()
|
||||
if group.id in group_hosts_map:
|
||||
group_info['hosts'] = group_hosts_map[group.id]
|
||||
|
Loading…
Reference in New Issue
Block a user