Files
Django/deploy/cleanup-lag-experiments.sh
2026-07-09 04:52:41 +08:00

25 lines
851 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
# 仅撤销「排查实验」加的配置cron 保活、慢请求追踪 override
# 由仓库脚本执行,不需要你手动 rm 任何路径
set -e
DJANGO_DIR="/opt/1panel/apps/openresty/nginx/www/sites/43.142.166.152.443/django"
cd "$DJANGO_DIR"
if [ -f /etc/cron.d/gunicorn-warmup ]; then
if grep -q 'gunicorn-warmup.sh' /etc/cron.d/gunicorn-warmup 2>/dev/null; then
echo ">>> 移除本仓库安装的 cron 保活"
rm -f /etc/cron.d/gunicorn-warmup
else
echo ">>> 跳过 cron非本仓库创建的文件"
fi
fi
if [ -f /etc/systemd/system/gunicorn-dianjing.service.d/slow-trace.conf ]; then
echo ">>> 关闭慢请求追踪 override"
rm -f /etc/systemd/system/gunicorn-dianjing.service.d/slow-trace.conf
systemctl daemon-reload
systemctl restart gunicorn-dianjing.service
fi
echo "清理完成。"