def simplequeue_put(self, data): try: simplequeue_addr = self.simplequeue_address.get() http.http_fetch(simplequeue_addr + '/put', dict(data=data)) self.simplequeue_address.success(simplequeue_addr) except: self.simplequeue_address.failed(simplequeue_addr) raise
def simplequeue_get(self): try: simplequeue_addr = self.simplequeue_address.get() if self.mget_items: msg = http.http_fetch(simplequeue_addr + '/mget?items=' + str(self.mget_items)) else: msg = http.http_fetch(simplequeue_addr + '/get') self.simplequeue_address.success(simplequeue_addr) return msg except: self.simplequeue_address.failed(simplequeue_addr) raise