fix:优化服务
This commit is contained in:
18
video_worker/scripts/run_ws_service.bat
Normal file
18
video_worker/scripts/run_ws_service.bat
Normal file
@@ -0,0 +1,18 @@
|
||||
@echo off
|
||||
setlocal
|
||||
cd /d %~dp0\..
|
||||
if not exist .venv (
|
||||
echo [ERROR] .venv not found, run install script first
|
||||
exit /b 1
|
||||
)
|
||||
if not exist .env (
|
||||
echo [ERROR] .env not found, copy from .env.example
|
||||
exit /b 1
|
||||
)
|
||||
call .venv\Scripts\activate.bat
|
||||
for /f "usebackq tokens=1,* delims==" %%A in (".env") do (
|
||||
if not "%%A"=="" set "%%A=%%B"
|
||||
)
|
||||
if "%WS_GATEWAY_HOST%"=="" set WS_GATEWAY_HOST=0.0.0.0
|
||||
if "%WS_GATEWAY_PORT%"=="" set WS_GATEWAY_PORT=8010
|
||||
python -m uvicorn app.ws_service:app --host %WS_GATEWAY_HOST% --port %WS_GATEWAY_PORT%
|
||||
Reference in New Issue
Block a user