mirror of
https://github.com/ansible/awx.git
synced 2026-01-21 14:38:00 -03:30
Use shallow copy in fact cache plugin
This deep copy would cause ansible-playbook to get hung up and fail to spawn new subprocesses thus forcing extremely large scan jobs to serialize their connections through one process. This had the effect of forcing `forks=1` behavior. This change was for citco, a customer who is running scan jobs against 600 hosts with a forks value of 200.
This commit is contained in:
parent
55c230f428
commit
9cc9ef6b33
@ -32,7 +32,7 @@
|
||||
import sys
|
||||
import os
|
||||
import time
|
||||
from copy import deepcopy
|
||||
from copy import copy
|
||||
from ansible import constants as C
|
||||
try:
|
||||
from ansible.cache.base import BaseCacheModule
|
||||
@ -110,7 +110,7 @@ class CacheModule(BaseCacheModule):
|
||||
# Assume ansible fact triggered the set if no new module found
|
||||
facts = self.filter_ansible_facts(value) if not module else dict({ module : value[module]})
|
||||
self._cache[key] = value
|
||||
self._cache_prev = deepcopy(self._cache)
|
||||
self._cache_prev = copy(self._cache)
|
||||
packet = {
|
||||
'host': key,
|
||||
'inventory_id': os.environ['INVENTORY_ID'],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user