From: Thorsten Date: Sat, 24 Jun 2023 19:01:01 +0000 (+0200) Subject: fix meta plugin X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=e73b964f45761b2064cfce5545710fa704a2f81a;p=urlbot-v3.git fix meta plugin --- diff --git a/distbot/plugins/plugin_help.py b/distbot/plugins/plugin_help.py index fd5aad1..7974454 100644 --- a/distbot/plugins/plugin_help.py +++ b/distbot/plugins/plugin_help.py @@ -28,16 +28,13 @@ class Plugins(Worker): 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"))