mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-11 12:38:02 +00:00
fix: Enable lifespan=on for uvicorn
Default behavior is "auto", meaning it will try lifespan, but if something goes wrong, it will silently swallow the issue and won't use the lifespan handler at all. This default behavior resulted in silently breaking shutdown handlers for providers. With this patch, server will fail to start next time something gets borked in the middleware layer, which is good. Related: #188 Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
This commit is contained in:
parent
056eb68fcc
commit
ca571025f5
1 changed files with 1 additions and 0 deletions
|
@ -418,6 +418,7 @@ def main():
|
|||
"app": app,
|
||||
"host": listen_host,
|
||||
"port": port,
|
||||
"lifespan": "on",
|
||||
}
|
||||
if ssl_config:
|
||||
uvicorn_config.update(ssl_config)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue