From e7c4e63dd13b03d06cbf24911e1ca552f6566bfe Mon Sep 17 00:00:00 2001 From: Thorsten S Date: Wed, 3 Oct 2018 18:37:47 +0200 Subject: [PATCH] declare actionqueue before use --- distbot/bot/action_worker.py | 2 ++ distbot/bot/bot.py | 1 + 2 files changed, 3 insertions(+) diff --git a/distbot/bot/action_worker.py b/distbot/bot/action_worker.py index 429b07f..94406dc 100755 --- a/distbot/bot/action_worker.py +++ b/distbot/bot/action_worker.py @@ -67,6 +67,8 @@ class ActionThread(threading.Thread): def run(self): logger.debug("Processing actions in queue %s", self.bot.actionqueue) self.event_thread.start() + + self.channel.queue_declare(queue=self.bot.actionqueue, durable=True) self.channel.basic_consume(self.callback, queue=self.bot.actionqueue) self.channel.start_consuming() diff --git a/distbot/bot/bot.py b/distbot/bot/bot.py index b640c03..79522ee 100755 --- a/distbot/bot/bot.py +++ b/distbot/bot/bot.py @@ -86,6 +86,7 @@ class Bot(sleekxmpp.ClientXMPP): channel.exchange_declare(exchange='topic_command', exchange_type='topic') channel.exchange_declare(exchange='topic_parse', exchange_type='topic') channel.queue_declare(queue=WORKER_QUEUE, durable=True) + channel.queue_declare(queue=self.actionqueue, durable=True) for classes in PLUGIN_MODULES.values(): for cls in classes: -- 2.39.2