Skip to content

Commit

Permalink
fix file pbar for delete
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan King committed Feb 12, 2024
1 parent a9fdadd commit b42f926
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hail/python/hailtop/aiotools/delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])


Expand Down

0 comments on commit b42f926

Please sign in to comment.