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

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())