Пример #1
0
def delete_collection_by_cid(cid):
    source_set_dict = get_set_names()
    if cid not in source_set_dict:
        logger.error("Cannot delete this collection, cid not found:%s", cid)
        return False
    if ( not datastore.delete_oid_data("collections_meta", cid)
         or not datastore.delete_oid_data("collections", cid)):
        logger.error("Collection deletion failed")
        return False
    return True
Пример #2
0
def flush_oid(oid):
    logger.warning("Flushing data for oid %s", oid)
    for cid in collection_cids():
        if oid in expand_oids(cid):
            prune_collection_by_cid(cid, [oid])
            flush_oid(cid)
                
    for mod_type in modules_available:
        for mod_name in modules_available[mod_type]:
            datastore.delete_oid_data(mod_name, oid)