Ver Fonte

Update __init__.py

DrMelone há 4 meses atrás
pai
commit
f17befc853
1 ficheiros alterados com 8 adições e 1 exclusões
  1. 8 1
      backend/open_webui/__init__.py

+ 8 - 1
backend/open_webui/__init__.py

@@ -73,8 +73,15 @@ def serve(
             os.environ["LD_LIBRARY_PATH"] = ":".join(LD_LIBRARY_PATH)
 
     import open_webui.main  # we need set environment variables before importing main
+    from open_webui.env import UVICORN_WORKERS  # Import the workers setting
 
-    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="*",
+        workers=UVICORN_WORKERS
+    )
 
 
 @app.command()