This commit is contained in:
Timothy Jaeryang Baek committed 2025-05-08 20:47:41 +04:00
1 parent 68f5ff540c
commit 08b6ea0e17
2 files changed
+12 -4

No files matched your search

+2 -3
View File
@@ -461,10 +461,9 @@ async def lifespan(app: FastAPI):
log.info("Installing external dependencies of functions and tools...")
install_tool_and_function_dependencies()
pool_size = THREAD_POOL_SIZE
if pool_size and pool_size > 0:
if THREAD_POOL_SIZE and THREAD_POOL_SIZE > 0:
limiter = anyio.to_thread.current_default_thread_limiter()
limiter.total_tokens = pool_size
limiter.total_tokens = THREAD_POOL_SIZE
asyncio.create_task(periodic_usage_pool_cleanup())