Skip to content

Commit

Permalink
remove unnecessary CapacityLimiter
Browse files Browse the repository at this point in the history
Signed-off-by: technillogue <[email protected]>
  • Loading branch information
technillogue committed Nov 6, 2023
1 parent c76780b commit daec233
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions python/cog/server/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit daec233

Please sign in to comment.