Ejemplo n.º 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()
Ejemplo n.º 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()
Ejemplo n.º 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
Ejemplo n.º 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