Reorganizing the way the connection lockfile is created

This commit is contained in:
James Cammarata
2015-09-03 00:18:52 -04:00
parent 7034bbef30
commit b9afbf0ee4
3 changed files with 17 additions and 18 deletions

View File

@@ -23,7 +23,6 @@ import multiprocessing
import os
import socket
import sys
import tempfile
from ansible import constants as C
from ansible.errors import AnsibleError
@@ -79,10 +78,6 @@ class TaskQueueManager:
self._failed_hosts = dict()
self._unreachable_hosts = dict()
# A temporary file (opened pre-fork) used by connection plugins for
# inter-process locking.
self._options.connection_lockfile = tempfile.TemporaryFile()
self._final_q = multiprocessing.Queue()
# create the pool of worker threads, based on the number of forks specified