Beispiel #1
0
def ensure_parity(version, dry_run):
    if check_parity_files(version):
        return
    logger.warn('Parity files for version {0} not found'.format(version._id))
    if dry_run:
        return
    file_path = download_from_cloudfiles(version)
    parity_paths = storage_utils.create_parity_files(file_path)
    for parity_path in parity_paths:
        container_parity.create(parity_path)
        os.remove(parity_path)
    if not check_parity_files(version):
        logger.error('Parity files for version {0} not found after update'.format(version._id))
Beispiel #2
0
def ensure_parity(version, dry_run):
    if check_parity_files(version):
        return
    logger.warn('Parity files for version {0} not found'.format(version._id))
    if dry_run:
        return
    file_path = download_from_cloudfiles(version)
    parity_paths = storage_utils.create_parity_files(file_path)
    for parity_path in parity_paths:
        container_parity.create(parity_path)
        os.remove(parity_path)
    if not check_parity_files(version):
        logger.error(
            'Parity files for version {0} not found after update'.format(
                version._id))