Example #1
0
def run(dry_run, thread_pool_size=10, io_dir='throughput/'):
    saas_file_owners_diffs = read_saas_file_owners_diffs(io_dir)
    if len(saas_file_owners_diffs) == 0:
        return

    available_thread_pool_size = \
        threaded.estimate_available_thread_pool_size(
            thread_pool_size,
            len(saas_file_owners_diffs))

    threaded.run(osd_run_wrapper,
                 saas_file_owners_diffs,
                 thread_pool_size,
                 dry_run=dry_run,
                 available_thread_pool_size=available_thread_pool_size)
def run(dry_run, thread_pool_size=10, io_dir='throughput/'):
    saas_file_owners_diffs = read_saas_file_owners_diffs(io_dir)
    if len(saas_file_owners_diffs) == 0:
        return

    available_thread_pool_size = \
        threaded.estimate_available_thread_pool_size(
            thread_pool_size,
            len(saas_file_owners_diffs))

    exit_codes = threaded.run(
        osd_run_wrapper, saas_file_owners_diffs, thread_pool_size,
        dry_run=dry_run,
        available_thread_pool_size=available_thread_pool_size
    )

    if [ec for ec in exit_codes if ec]:
        sys.exit(1)