Commit c6c7eabc by imwangxiaozhou

chore: 将启动脚本中的 python 命令统一替换为 python3

避免在不同系统环境中因 python 命令别名问题导致执行失败,确保使用 Python 3 解释器。
1 parent 5cec632b
Showing 1 changed file with 3 additions and 3 deletions
......@@ -14,7 +14,7 @@ echo "=== 门店管理服务启动脚本 ==="
# 1. 检查依赖
if [ -f "requirements.txt" ]; then
echo "正在检查并安装依赖..."
pip install -r requirements.txt > /dev/null 2>&1
pip3 install -r requirements.txt > /dev/null 2>&1
fi
# 2. 启动同步任务 (后台运行)
......@@ -22,7 +22,7 @@ if [ -f "$SYNC_PID" ] && ps -p $(cat "$SYNC_PID") > /dev/null 2>&1; then
echo "警告: 同步服务已在运行 (PID: $(cat $SYNC_PID))。"
else
echo "正在启动定时同步服务 (每12小时一次)..."
nohup python sync_data.py > "$SYNC_LOG" 2>&1 &
nohup python3 sync_data.py > "$SYNC_LOG" 2>&1 &
echo $! > "$SYNC_PID"
echo "同步服务已启动 (PID: $!)"
fi
......@@ -41,7 +41,7 @@ else
HOST=${CONF_HOST:-0.0.0.0}
echo "配置信息: $HOST:$PORT"
nohup python search_merchants.py --server --host "$HOST" --port "$PORT" > "$API_LOG" 2>&1 &
nohup python3 search_merchants.py --server --host "$HOST" --port "$PORT" > "$API_LOG" 2>&1 &
echo $! > "$API_PID"
echo "API 服务已启动 (PID: $!)"
fi
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!