示例#1
0
 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
示例#2
0
 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