mirror of
https://github.com/HKUDS/LightRAG.git
synced 2025-12-27 14:52:34 +00:00
Ensure priority_limit_async_func_call decorator receive callable
This commit is contained in:
parent
5c533f5e1a
commit
2845e268e4
@ -326,6 +326,9 @@ def priority_limit_async_func_call(max_size: int, max_queue_size: int = 1000):
|
||||
"""
|
||||
|
||||
def final_decro(func):
|
||||
# Ensure func is callable
|
||||
if not callable(func):
|
||||
raise TypeError(f"Expected a callable object, got {type(func)}")
|
||||
queue = asyncio.PriorityQueue(maxsize=max_queue_size)
|
||||
tasks = set()
|
||||
initialization_lock = asyncio.Lock()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user