Skip to content

Commit

Permalink
add additional asyncio.sleep in list_keys loop over files, fixes HDFG…
Browse files Browse the repository at this point in the history
  • Loading branch information
assaron committed Apr 3, 2024
1 parent 4b9a4a0 commit 2239a58
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hsds/util/fileClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,8 @@ async def list_keys(
key_names = {} if include_stats else []
count = 0
for filename in files:
if len(key_names) % 1000 == 0:
await asyncio.sleep(0)
if filename.startswith(filesep):
filename = filename[1:]
log.debug(f"filename: {filename}, basedir: {basedir}")
Expand Down

0 comments on commit 2239a58

Please sign in to comment.