mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix handler listeners as a list
The listen statement on handlers should have supported a list, however it was broken in the revision of the pub/sub feature based on the handler revamp. This patch corrects the bug, so this works again: - name: some handler ... listen: - some target - another target Fixes #16378
This commit is contained in:
parent
b7f9037b5b
commit
15e648dd94
1 changed files with 7 additions and 3 deletions
|
@ -149,9 +149,13 @@ class TaskQueueManager:
|
|||
if handler not in self._notified_handlers:
|
||||
self._notified_handlers[handler] = []
|
||||
if handler.listen:
|
||||
if handler.listen not in self._listening_handlers:
|
||||
self._listening_handlers[handler.listen] = []
|
||||
self._listening_handlers[handler.listen].append(handler.get_name())
|
||||
listeners = handler.listen
|
||||
if not isinstance(listeners, list):
|
||||
listeners = [ listeners ]
|
||||
for listener in listeners:
|
||||
if listener not in self._listening_handlers:
|
||||
self._listening_handlers[listener] = []
|
||||
self._listening_handlers[listener].append(handler.get_name())
|
||||
|
||||
def load_callbacks(self):
|
||||
'''
|
||||
|
|
Loading…
Add table
Reference in a new issue