diff --git a/hail/python/hailtop/aiotools/delete.py b/hail/python/hailtop/aiotools/delete.py index e6754a9be4ee..c5c933d7d341 100644 --- a/hail/python/hailtop/aiotools/delete.py +++ b/hail/python/hailtop/aiotools/delete.py @@ -24,8 +24,10 @@ async def remove(path): await fs.remove(path) except FileNotFoundError: await fs.rmtree(sema, path, listener=listener) + file_pbar.advance(1) # only advance if file or directory removal was successful, not on error for grouped_paths in grouped(5_000, paths): + file_pbar.update(0, total=file_pbar.total() + len(grouped_paths)) await asyncio.gather(*[remove(path) for path in grouped_paths])