diff options
author | Martin Krizek <martin.krizek@gmail.com> | 2019-01-09 16:15:11 +0100 |
---|---|---|
committer | Brian Coca <bcoca@users.noreply.github.com> | 2019-01-09 16:15:11 +0100 |
commit | 4c72ef124b4e9ef5454ab30dab36089c4145a592 (patch) | |
tree | 1347fa8f4572f35a42132a0d84e0972f31ad0803 | |
parent | Fixing exception import for tower modules (#50447) (diff) | |
download | ansible-4c72ef124b4e9ef5454ab30dab36089c4145a592.tar.xz ansible-4c72ef124b4e9ef5454ab30dab36089c4145a592.zip |
tqm._initialize_notified_handlers() is noop now (#50713)
-rw-r--r-- | lib/ansible/executor/task_queue_manager.py | 23 | ||||
-rw-r--r-- | test/units/plugins/strategy/test_strategy_base.py | 1 |
2 files changed, 0 insertions, 24 deletions
diff --git a/lib/ansible/executor/task_queue_manager.py b/lib/ansible/executor/task_queue_manager.py index 5de7dbc306..72138322f3 100644 --- a/lib/ansible/executor/task_queue_manager.py +++ b/lib/ansible/executor/task_queue_manager.py @@ -110,26 +110,6 @@ class TaskQueueManager: 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 @@ -226,9 +206,6 @@ class TaskQueueManager: 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, diff --git a/test/units/plugins/strategy/test_strategy_base.py b/test/units/plugins/strategy/test_strategy_base.py index a15f3e7b26..541efd0a0b 100644 --- a/test/units/plugins/strategy/test_strategy_base.py +++ b/test/units/plugins/strategy/test_strategy_base.py @@ -525,7 +525,6 @@ class TestStrategyBase(unittest.TestCase): forks=5, ) tqm._initialize_processes(3) - tqm._initialize_notified_handlers(mock_play) tqm.hostvars = dict() try: |