Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tqm._initialize_notified_handlers() is noop now #50713

Merged
merged 1 commit into from
Jan 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 0 additions & 23 deletions lib/ansible/executor/task_queue_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,26 +110,6 @@ def _initialize_processes(self, num):
for i in range(num):
self._workers.append(None)

def _initialize_notified_handlers(self, play):
'''
Clears and initializes the shared notified handlers dict with entries
for each handler in the play, which is an empty array that will contain
inventory hostnames for those hosts triggering the handler.
'''

def _process_block(b):
temp_list = []
for t in b.block:
if isinstance(t, Block):
temp_list.extend(_process_block(t))
else:
temp_list.append(t)
return temp_list

handler_list = []
for handler_block in play.handlers:
handler_list.extend(_process_block(handler_block))

def load_callbacks(self):
'''
Loads all available callbacks, with the exception of those which
Expand Down Expand Up @@ -226,9 +206,6 @@ def run(self, play):

self.send_callback('v2_playbook_on_play_start', new_play)

# initialize the shared dictionary containing the notified handlers
self._initialize_notified_handlers(new_play)

# build the iterator
iterator = PlayIterator(
inventory=self._inventory,
Expand Down
1 change: 0 additions & 1 deletion test/units/plugins/strategy/test_strategy_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,6 @@ def fake_run(*args):
forks=5,
)
tqm._initialize_processes(3)
tqm._initialize_notified_handlers(mock_play)
tqm.hostvars = dict()

try:
Expand Down