Beispiel #1
0
def fetchcube(catalog_name, cube_name):
    """ Dump a single cube from a catalog. """
    catalog = get_catalog(catalog_name)
    cube_data = fetch_cube(catalog, cube_name)
    if cube_data is None:
        log.warn("Could not fetch: %s", cube_name)
    else:
        store_cube_raw(catalog_name, cube_name, cube_data)
Beispiel #2
0
def fetchcube(catalog_name, cube_name):
    """ Dump a single cube from a catalog. """
    catalog = get_catalog(catalog_name)
    cube_data = fetch_cube(catalog, cube_name)
    if cube_data is None:
        log.warn("Could not fetch: %s", cube_name)
    else:
        store_cube_raw(catalog_name, cube_name, cube_data)
Beispiel #3
0
def fetch(catalog_name, update=False):
    """ Dump all cubes from a catalog. """
    catalog = get_catalog(catalog_name)
    for cube_name in fetch_index(catalog):
        if not exists_raw(catalog_name, cube_name) or update:
            log.info("Fetching: %s", cube_name)
            try:
                cube_data = fetch_cube(catalog, cube_name)
                if cube_data is None:
                    log.warn("Could not fetch: %s", cube_name)
                else:
                    store_cube_raw(catalog_name, cube_name, cube_data)
            except Exception as e:
                log.exception(e)
Beispiel #4
0
def fetch(catalog_name, update=False):
    """ Dump all cubes from a catalog. """
    catalog = get_catalog(catalog_name)
    for cube_name in fetch_index(catalog):
        if not exists_raw(catalog_name, cube_name) or update:
            log.info("Fetching: %s", cube_name)
            try:
                cube_data = fetch_cube(catalog, cube_name)
                if cube_data is None:
                    log.warn("Could not fetch: %s", cube_name)
                else:
                    store_cube_raw(catalog_name, cube_name, cube_data)
            except Exception, e:
                log.exception(e)