Commit da538bc6 authored by root's avatar root

Close queue connection.

parent 86b9f2a0
......@@ -31,7 +31,7 @@
# interpreted as representing official policies, either expressed
# or implied, of GRNET S.A.
from pithos.lib.queue import exchange_connect, exchange_send, Receipt
from pithos.lib.queue import exchange_connect, exchange_send, exchange_close, Receipt
class Queue(object):
......@@ -48,3 +48,6 @@ class Queue(object):
def send(self, user, resource, value, details):
body = Receipt(self.client_id, user, resource, value, details).format()
exchange_send(self.conn, self.message_key, body)
def close(self):
exchange_close(self.conn)
......@@ -135,10 +135,14 @@ class ModularBackend(BaseBackend):
def send(self, *args):
pass
def close(self):
pass
self.queue = NoQueue()
def close(self):
self.wrapper.close()
self.queue.close()
@backend_method
def list_accounts(self, user, marker=None, limit=10000):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment