From be61e384a9c531c21aeee5fde5e06b3f3b94b6b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl>
Date: Fri, 3 Jun 2016 13:45:09 +0200
Subject: [PATCH] fixed #1

---
 coolamqp/handler.py | 3 +++
 requirements.txt    | 1 +
 setup.cfg           | 2 ++
 3 files changed, 6 insertions(+)
 create mode 100644 requirements.txt
 create mode 100644 setup.cfg

diff --git a/coolamqp/handler.py b/coolamqp/handler.py
index f7567a8..33049f8 100644
--- a/coolamqp/handler.py
+++ b/coolamqp/handler.py
@@ -100,6 +100,9 @@ class ClusterHandlerThread(threading.Thread):
             elif isinstance(order, DeleteQueue):
                 self.backend.queue_delete(order.queue)
             elif isinstance(order, ConsumeQueue):
+                if order.queue.consumer_tag in self.queues_by_consumer_tags:
+                    return    # already consuming, belay that
+
                 self.backend.queue_declare(order.queue)
 
                 if order.queue.exchange is not None:
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..8fd8878
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1 @@
+amqp
\ No newline at end of file
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..224a779
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,2 @@
+[metadata]
+description-file = README.md
\ No newline at end of file
-- 
GitLab