mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 12:21:26 -07:00
tqm._initialize_notified_handlers() is noop now (#50713)
This commit is contained in:
parent
cd27982959
commit
4c72ef124b
2 changed files with 0 additions and 24 deletions
|
@ -110,26 +110,6 @@ class TaskQueueManager:
|
||||||
for i in range(num):
|
for i in range(num):
|
||||||
self._workers.append(None)
|
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):
|
def load_callbacks(self):
|
||||||
'''
|
'''
|
||||||
Loads all available callbacks, with the exception of those which
|
Loads all available callbacks, with the exception of those which
|
||||||
|
@ -226,9 +206,6 @@ class TaskQueueManager:
|
||||||
|
|
||||||
self.send_callback('v2_playbook_on_play_start', new_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
|
# build the iterator
|
||||||
iterator = PlayIterator(
|
iterator = PlayIterator(
|
||||||
inventory=self._inventory,
|
inventory=self._inventory,
|
||||||
|
|
|
@ -525,7 +525,6 @@ class TestStrategyBase(unittest.TestCase):
|
||||||
forks=5,
|
forks=5,
|
||||||
)
|
)
|
||||||
tqm._initialize_processes(3)
|
tqm._initialize_processes(3)
|
||||||
tqm._initialize_notified_handlers(mock_play)
|
|
||||||
tqm.hostvars = dict()
|
tqm.hostvars = dict()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue