示例#1
0
def get_mosaic_bounds(rid):
    if rid in processes:
        if processes[rid].ready():
            tmpvrt = processes[rid].get()[0]
            rid2 = make_rid()
            processes[rid2] = get_bounds.delay(tmpvrt)
            return "{\"request\":\""+rid2+"\"}"
    return "{\"request\":\"WAIT\"}"
示例#2
0
def get_stats(rid):
    if rid in processes:
        if processes[rid].ready():
            tmpvrt = processes[rid].get()[1:]
            tmpvrt = [i[0:-3]+'csv' for i in tmpvrt]
            rid2 = make_rid()
            processes[rid2] = get_bounds.delay(tmpvrt)
            return "{\"request\":\"OK\",\"files\":\""+','.join(tmpvrt)+"\"}"
    return "{\"request\":\"WAIT\"}"