Skip to content

Unable to reload inside an event loop using 'create_task' #1843

Discussion options

You must be logged in to vote

That's correct. The reload only works when using uvicorn.run.

uvicorn/uvicorn/main.py

Lines 453 to 574 in 23b9f05

def run(
app: typing.Union["ASGIApplication", typing.Callable, str],
*,
host: str = "127.0.0.1",
port: int = 8000,
uds: typing.Optional[str] = None,
fd: typing.Optional[int] = None,
loop: LoopSetupType = "auto",
http: typing.Union[typing.Type[asyncio.Protocol], HTTPProtocolType] = "auto",
ws: typing.Union[typing.Type[asyncio.Protocol], WSProtocolType] = "auto",
ws_max_size: int = 16777216,
ws_ping_interval: typing.Optional[float] = 20.0,
ws_ping_timeout: typing.Optional[float] = 20.0,
ws_per_message_d…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Corfucinas
Comment options

Answer selected by Kludex
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants