replacement_handlers = []
existing_handlers = getattr(node, "request_handlers", None)
debug(f"> Updating Request Handlers with existing: {existing_handlers}")
new_keys = set(msg.handler.keys())
new_values = msg.handler.values()
if existing_handlers is not None:
for existing_handler in existing_handlers:
keys = set(existing_handler.keys())
After Change
matched = None
for existing_handler in existing_handlers:
// we match two handlers according to their tags
if existing_handler["tags"] == msg.handler["tags"]:
matched = existing_handler
// if an existing_handler match the passed in handler,
// we ignore it in for loop