Commit 1c4a0399 authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Set prefecth_count to 1.

parent d64a136b
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -15,7 +15,7 @@ class AMQPServer(threading.Thread):
        self.connection = pika.BlockingConnection(pika.ConnectionParameters(host = self.host, port = self.port))
        self.connection = pika.BlockingConnection(pika.ConnectionParameters(host = self.host, port = self.port))
        self.channel = self.connection.channel();
        self.channel = self.connection.channel();
        self.channel.queue_declare(queue = self.queue)
        self.channel.queue_declare(queue = self.queue)
        self.channel.basic_qos(prefetch_count = 16)
        self.channel.basic_qos(prefetch_count = 1)
        threading.Thread(target = self.channel.basic_consume(queue = self.queue, on_message_callback = self.on_request))
        threading.Thread(target = self.channel.basic_consume(queue = self.queue, on_message_callback = self.on_request))


    def on_request(self, ch, method, props, body):
    def on_request(self, ch, method, props, body):