Store routing_keys in a dict instead of set

This will let us keep track of which react script uses what routing
key. We will lose the set property, but that is immaterial because
the system will be in trouble anyway, if there are duplicate keys

Change-Id: I89299fcb7dfbe7ab4d7b2d1df9c1cb001489fd5f
This commit is contained in:
Pranesh Pandurangan 2014-06-19 14:11:02 -07:00
parent d0e9ace151
commit 0173ef0b53
1 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ class Engine(object):
self.engine_cfg: self.engine_disabled}
# Private variables to keep track of repair scripts.
self._repairs = []
self._known_routing_keys = set()
self._known_routing_keys = collections.defaultdict(list)
# Watchdog-related variables
self._watchdog_thread = None
@ -314,7 +314,7 @@ class Engine(object):
data['routing_key'])
if message_queue not in self.known_queues:
self.known_queues.append(message_queue)
self._known_routing_keys.add(data['routing_key'])
self._known_routing_keys[script].append(data['routing_key'])
kwargs = data
kwargs['name'] = script
kwargs['conf'] = script_args['cfg']