Initial commit: 百家号文章采集系统
This commit is contained in:
43
fix_taskworker.sh
Normal file
43
fix_taskworker.sh
Normal file
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
# 快速诊断和修复脚本
|
||||
|
||||
echo "======================================"
|
||||
echo " TaskWorker 快速诊断和修复工具"
|
||||
echo "======================================"
|
||||
echo ""
|
||||
|
||||
# 检查 Python 环境
|
||||
if ! command -v python3 &> /dev/null; then
|
||||
echo "❌ Python3 未找到"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 进入脚本所在目录
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
echo "[1] 检查 TaskWorker 状态..."
|
||||
python3 check_taskworker.py
|
||||
|
||||
echo ""
|
||||
read -p "是否需要修复? (y/n): " -n 1 -r
|
||||
echo ""
|
||||
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo ""
|
||||
echo "[2] 正在修复..."
|
||||
python3 check_taskworker.py --fix
|
||||
|
||||
echo ""
|
||||
echo "[3] 重新检查状态..."
|
||||
sleep 2
|
||||
python3 check_taskworker.py
|
||||
|
||||
echo ""
|
||||
echo "✅ 修复完成!"
|
||||
else
|
||||
echo ""
|
||||
echo "已取消修复"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "======================================"
|
||||
Reference in New Issue
Block a user