mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
Revert "Move queuing tasks to a background thread"
This reverts commit b71957d6e6
.
This commit is contained in:
parent
70e63ddf6c
commit
dfb1c0647e
8 changed files with 158 additions and 222 deletions
|
@ -36,7 +36,7 @@ from ansible.module_utils._text import to_bytes, to_text
|
|||
# Must import strategy and use write_locks from there
|
||||
# If we import write_locks directly then we end up binding a
|
||||
# variable to the object and then it never gets updated.
|
||||
from ansible.executor import action_write_locks
|
||||
from ansible.plugins import strategy
|
||||
|
||||
try:
|
||||
from __main__ import display
|
||||
|
@ -605,16 +605,16 @@ def _find_snippet_imports(module_name, module_data, module_path, module_args, ta
|
|||
display.debug('ANSIBALLZ: using cached module: %s' % cached_module_filename)
|
||||
zipdata = open(cached_module_filename, 'rb').read()
|
||||
else:
|
||||
if module_name in action_write_locks.action_write_locks:
|
||||
if module_name in strategy.action_write_locks:
|
||||
display.debug('ANSIBALLZ: Using lock for %s' % module_name)
|
||||
lock = action_write_locks.action_write_locks[module_name]
|
||||
lock = strategy.action_write_locks[module_name]
|
||||
else:
|
||||
# If the action plugin directly invokes the module (instead of
|
||||
# going through a strategy) then we don't have a cross-process
|
||||
# Lock specifically for this module. Use the "unexpected
|
||||
# module" lock instead
|
||||
display.debug('ANSIBALLZ: Using generic lock for %s' % module_name)
|
||||
lock = action_write_locks.action_write_locks[None]
|
||||
lock = strategy.action_write_locks[None]
|
||||
|
||||
display.debug('ANSIBALLZ: Acquiring lock')
|
||||
with lock:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue