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\"}"
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\"}"