def __call__(self):
    os.makedirs(self.output_folder, exist_ok=True)
    chunk_slices = calculate_chunk_slices(self.videos_per_chunk, len(self.adapter))
    gulp_directory = GulpDirectory(self.output_folder)
    new_chunks = gulp_directory.new_chunks(len(chunk_slices))
    chunk_writer = ChunkWriter(self.adapter)
    with ProcessPoolExecutor(max_workers=self.num_workers) as executor:
        result = executor.map(chunk_writer.write_chunk, new_chunks, chunk_slices)
        for r in tqdm(result, desc='Chunks finished', unit='chunk', dynamic_ncols=True, total=len(chunk_slices)):
            pass
def __call__(self):
    os.makedirs(self.output_folder, exist_ok=True)
    chunk_slices = calculate_chunk_slices(self.videos_per_chunk, len(self.adapter))
    gulp_directory = GulpDirectory(self.output_folder)
    new_chunks = gulp_directory.new_chunks(len(chunk_slices))
    chunk_writer = ChunkWriter(self.adapter)
    with ProcessPoolExecutor(max_workers=self.num_workers) as executor:
        result = executor.map(chunk_writer.write_chunk, new_chunks, chunk_slices)
        for r in tqdm(result, desc='Chunks finished', unit='chunk', dynamic_ncols=True, total=len(chunk_slices)):
            pass