From: Thorsten S Date: Wed, 3 Oct 2018 16:37:47 +0000 (+0200) Subject: declare actionqueue before use X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=e7c4e63dd13b03d06cbf24911e1ca552f6566bfe;p=urlbot-v3.git declare actionqueue before use --- 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: