pipeline-app/restart-pipeline.sh
yumoqing b849eb3e92 feat(office): 补提交 univer-office 办公代理(已部署上线)
/office/* 反向代理到本机 univer-office Node 服务(9091),承接 markdown<->IDocumentData 转换 + docx/xlsx/ppt 导出。含 office_proxy.py + config.json 路由 + pipeline_app 注册 + restart-pipeline.sh
2026-08-21 17:28:47 +08:00

28 lines
695 B
Bash
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.

#!/bin/bash
# 重启 pipeline-app避免 pkill -f pipeline_app 自杀:精确匹配 python 主进程路径)
cd /d/pipeline/pipeline-app
echo "=== 杀旧进程 ==="
if [ -f pipeline.pid ]; then
kill $(cat pipeline.pid) 2>/dev/null
fi
pkill -f "app/pipeline_app.py" 2>/dev/null
sleep 3
if pgrep -f "app/pipeline_app.py" > /dev/null; then
echo "still running, force kill"
pkill -9 -f "app/pipeline_app.py" 2>/dev/null
sleep 2
fi
rm -f pipeline.pid pipeline-web.pid pipeline-worker-*.pid
echo "=== 启动 ==="
bash start.sh
sleep 6
echo "=== 进程 ==="
ps aux | grep "app/pipeline_app.py" | grep -v grep | head -2
echo "=== 日志 tail ==="
tail -15 logs/pipeline.log 2>/dev/null