From daec2337aa6cedd2dc7b5f55864242d79601680f Mon Sep 17 00:00:00 2001 From: technillogue Date: Mon, 6 Nov 2023 12:17:45 -0500 Subject: [PATCH] remove unnecessary CapacityLimiter Signed-off-by: technillogue --- python/cog/server/http.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/python/cog/server/http.py b/python/cog/server/http.py index fa95d41a48..6f7ae74866 100644 --- a/python/cog/server/http.py +++ b/python/cog/server/http.py @@ -13,8 +13,6 @@ import structlog import uvicorn -from anyio import CapacityLimiter -from anyio.lowlevel import RunVar from fastapi import Body, FastAPI, Header, HTTPException, Path, Response from fastapi.encoders import jsonable_encoder from fastapi.exceptions import RequestValidationError @@ -93,10 +91,6 @@ async def wrapped(*args: Any, **kwargs: Any) -> Any: @app.on_event("startup") def startup() -> None: - # https://github.com/tiangolo/fastapi/issues/4221 - # potentially no longer necessary? - RunVar("_default_thread_limiter").set(CapacityLimiter(threads)) # type: ignore - app.state.setup_result = runner.setup() @app.on_event("shutdown")