From 8ae5bffc64c40cbf4de3b2a0880b03ce0a2c3d3a Mon Sep 17 00:00:00 2001 From: John Readey Date: Mon, 1 Apr 2024 03:24:42 -0700 Subject: [PATCH] Listkeys (#336) * allow other tasks to run fileClient.listKeys * avoid blocking and list_keys * added handlers for timeout error * fix flake8 errors * fix modulo check * fix for modulo --- hsds/util/fileClient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hsds/util/fileClient.py b/hsds/util/fileClient.py index 61fe3690..6f70c039 100644 --- a/hsds/util/fileClient.py +++ b/hsds/util/fileClient.py @@ -367,7 +367,7 @@ async def list_keys( files.append(filepath) if limit and len(files) >= limit: break - if len(files) % 1000: + if len(files) % 1000 == 0: await asyncio.sleep(0) # use a dictionary to hold return values if stats are needed