Skip to content
Snippets Groups Projects
Commit 206f691d authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

Update consume to accept new feature

parent 9296aed0
No related branches found
No related tags found
No related merge requests found
...@@ -51,7 +51,15 @@ def worker(ch, method, properties, body): ...@@ -51,7 +51,15 @@ def worker(ch, method, properties, body):
rc_rmq.delete_queue() rc_rmq.delete_queue()
def consume(queuename, routing_key="", callback=worker, debug=False): def consume(
queuename,
routing_key="",
callback=worker,
bind=True,
durable=True,
exclusive=False,
debug=False,
):
if routing_key == "": if routing_key == "":
routing_key = "complete." + queuename routing_key = "complete." + queuename
...@@ -62,6 +70,9 @@ def consume(queuename, routing_key="", callback=worker, debug=False): ...@@ -62,6 +70,9 @@ def consume(queuename, routing_key="", callback=worker, debug=False):
{ {
"queue": queuename, "queue": queuename,
"routing_key": routing_key, "routing_key": routing_key,
"bind": bind,
"durable": durable,
"exclusive": exclusive,
"cb": callback, "cb": callback,
} }
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment