示例#1
0
 def inner(name):
     queue.use(name)
     queue.watch(name)
     while True:
         job = queue.reserve(timeout=1)
         if job is None: break
         job.delete()
示例#2
0
 def inner(name):
     queue.use(name)
     queue.watch(name)
     while True:
         job = queue.reserve(timeout=1)
         if job is None: break
         job.delete()
示例#3
0
def add(queue, args):
    name = optdict.get('-q')
    if name: queue.use(name)
    funcname = optdict.get('-f', 'main')
    for url in args:
        queue.put(httputils.ReqInfo(funcname, url).pack())
        print 'put:', url
示例#4
0
def add(queue, args):
    name = optdict.get('-q')
    if name: queue.use(name)
    funcname = optdict.get('-f', 'main')
    for url in args:
        queue.put(httputils.ReqInfo(funcname, url).pack())
        print 'put:', url