Beispiel #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()
Beispiel #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()
Beispiel #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
Beispiel #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