mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
fix: dev2
This commit is contained in:
@@ -52,9 +52,10 @@ def serve(
|
||||
)
|
||||
os.environ["USE_CUDA_DOCKER"] = "false"
|
||||
os.environ["LD_LIBRARY_PATH"] = ":".join(LD_LIBRARY_PATH)
|
||||
|
||||
import open_webui.main # we need set environment variables before importing main
|
||||
|
||||
uvicorn.run("open_webui.main:app", host=host, port=port, forwarded_allow_ips="*")
|
||||
uvicorn.run(open_webui.main.app, host=host, port=port, forwarded_allow_ips="*")
|
||||
|
||||
|
||||
@app.command()
|
||||
|
||||
@@ -90,10 +90,14 @@ async def periodic_usage_pool_cleanup():
|
||||
await asyncio.sleep(TIMEOUT_DURATION)
|
||||
|
||||
|
||||
async def on_startup():
|
||||
asyncio.create_task(periodic_usage_pool_cleanup())
|
||||
|
||||
|
||||
app = socketio.ASGIApp(
|
||||
sio,
|
||||
socketio_path="/ws/socket.io",
|
||||
on_startup=asyncio.create_task(periodic_usage_pool_cleanup()),
|
||||
on_startup=on_startup(),
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user