diff options
author | James Cammarata <jimi@sngx.net> | 2016-08-26 14:55:56 -0500 |
---|---|---|
committer | James Cammarata <jimi@sngx.net> | 2016-08-28 10:19:23 -0500 |
commit | d5dd191c6c22a5ff23c3a03bb85fe11291fe0b29 (patch) | |
tree | a801b5f71bbf7b5942201506ffe42f2bb0ac9cb2 /lib/ansible/executor/module_common.py | |
parent | 4b679ffd844ee4549c76cd7e44ecce7968c53e66 (diff) | |
download | ansible-feature_threaded_queue.tar.gz |
Move queuing tasks to a background threadfeature_threaded_queue
Diffstat (limited to 'lib/ansible/executor/module_common.py')
-rw-r--r-- | lib/ansible/executor/module_common.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ansible/executor/module_common.py b/lib/ansible/executor/module_common.py index df2be06f70..1243dad932 100644 --- a/lib/ansible/executor/module_common.py +++ b/lib/ansible/executor/module_common.py @@ -37,7 +37,7 @@ from ansible.utils.unicode import to_bytes, to_unicode # 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.plugins import strategy +from ansible.executor.task_queue_manager import action_write_locks try: from __main__ import display @@ -596,16 +596,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 strategy.action_write_locks: + if module_name in action_write_locks: display.debug('ANSIBALLZ: Using lock for %s' % module_name) - lock = strategy.action_write_locks[module_name] + lock = 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 = strategy.action_write_locks[None] + lock = action_write_locks[None] display.debug('ANSIBALLZ: Acquiring lock') with lock: |