plugin_storage = {}
reverse_lookup = {}
- def __init__(self, actionqueue, queue=""):
- super(Plugins, self).__init__(actionqueue, queue)
+ def init_channel(self):
+ super().init_channel()
self.channel.exchange_declare(exchange='plugin_exc', exchange_type='fanout')
-
- def run(self):
result = self.channel.queue_declare(exclusive=True, queue=self.queue)
plugin_queue = result.method.queue
self.channel.queue_bind(exchange='plugin_exc', queue=plugin_queue)
self.channel.basic_consume(queue='plugin_registry', on_message_callback=self.callback_plugins)
- super(Plugins, self).run()
def callback_plugins(self, ch, method, properties, body):
body = json.loads(body.decode("utf-8"))