From bc00a998e6f7305b76c35a6a26dd6fcb402e4833 Mon Sep 17 00:00:00 2001 From: Max Countryman Date: Thu, 8 May 2014 19:28:23 -0700 Subject: [PATCH] long polling supported --- iron_mq.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iron_mq.py b/iron_mq.py index 61035d6..ef7d448 100644 --- a/iron_mq.py +++ b/iron_mq.py @@ -90,7 +90,7 @@ def post(self, *messages): return result['body'] - def get(self, max=None, timeout=None): + def get(self, max=None, timeout=None, wait=None): """Executes an HTTP request to get a message off of a queue. Keyword arguments: @@ -102,6 +102,8 @@ def get(self, max=None, timeout=None): qitems["n"] = max if timeout is not None: qitems["timeout"] = timeout + if wait is not None: + qitems["wait"] = wait qs = [] for k, v in qitems.items(): qs.append("%s=%s" % (k, v))