]> git.aero2k.de Git - urlbot-v3.git/commitdiff
declare actionqueue before use
authorThorsten S <mail@aero2k.de>
Wed, 3 Oct 2018 16:37:47 +0000 (18:37 +0200)
committerThorsten S <mail@aero2k.de>
Wed, 3 Oct 2018 16:37:47 +0000 (18:37 +0200)
distbot/bot/action_worker.py
distbot/bot/bot.py

index 429b07f62ecee483692535d94d4135c84530ff6b..94406dc4dc274c63368516f8133e0c5ba6fe2916 100755 (executable)
@@ -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()
 
index b640c03bb4f8d8356a1027dd016609f24f2becbc..79522eea053b6f516ce2632dcead18d2303b8917 100755 (executable)
@@ -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: