Files
python-ai-video/run.bat
2024-09-27 01:10:21 +08:00

59 lines
1.0 KiB
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
:menu
cls
echo.
echo. AI爬虫 批处理启动菜单
echo.
echo. 1: 启动 FastApi
echo. 2: 启动 Celery
echo. 3: 启动 Flower WebUi
echo. 4: 启动 Redis Server
echo. 5: 全部 启动
ECHO.
set/p option="请输入你的选择:"
if "%option%"=="1" (
call:fastapi
goto menu
)
if "%option%"=="2" (
call:celery
goto menu
)
if "%option%"=="3" (
call:flower
goto menu
)
if "%option%"=="4" (
call:redis
goto menu
)
if "%option%"=="5" (
call:all
goto menu
)
:fastapi
start cmd /k "echo 正在启动 FastApi请稍等... && python -B main.py"
goto:eof
:celery
start cmd /k "echo 正在启动 Celery请稍等... && celery -A src.celery.main.app worker -l info -P eventlet"
goto:eof
:flower
start cmd /k "echo 正在启动 Flower请稍等... && celery --broker=redis://:lb714500@127.0.0.1:6379/0 flower --port=5551"
goto:eof
:redis
start cmd /k "echo 正在启动 Redis Server请稍等... && cd C:\Program Files\Redis && redis-server.exe redis.windows.conf"
goto:eof
:all
call:redis
call:fastapi
call:celery
call:flower
goto menu
goto:eof