def do_acc(pid, job): parsed = parse_pid(pid) lid = parsed[LID] ts_label = parsed[TS_LABEL] roots = get_data_roots(session, ts_label) # get raw data roots fileset = parsed_pid2fileset(parsed, roots) fileset[LID] = lid session.expire_all() # don't be stale! acc = Accession(session,ts_label)#,fast=True) # FIXME fast=True disables checksumming client.update(pid,ttl=3600) # allow 1hr for accession ret = acc.add_fileset(fileset) if ret=='ADDED': schedule_products(pid, client) session.commit() client.wakeup() elif ret=='FAILED': raise Exception('accession failed')
def get_fileset(parsed): time_series = parsed['ts_label'] data_roots = list(get_data_roots(time_series)) return parsed_pid2fileset(parsed,data_roots)