fix(api): 修复邮件队列超时并补齐调度进程
延长 SendEmailJob 超时并改为超时直接失败,补充重试退避、 失败日志与收件人脱敏,避免 send_email 队列批量超时重试。 新增 MAIL_TIMEOUT 与 QUEUE_RETRY_AFTER 配置,并抽出邮件运行时 配置与 HTML 内容服务,确保 Horizon 常驻进程使用最新邮件配置。 为 Docker、supervisor 与 compose 样例补齐 scheduler 进程,并在 节点管理端开启墙检测托管时立即触发一次检测,保证定时任务持续生效。
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
run_migrate=false
|
||||
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--migrate)
|
||||
run_migrate=true
|
||||
;;
|
||||
-h|--help)
|
||||
echo "Usage: sh ./scripts/update.sh [--migrate]"
|
||||
echo " --migrate Run 'php artisan migrate --force' after containers are updated."
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option: $arg"
|
||||
echo "Usage: sh ./scripts/update.sh [--migrate]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ ! -f .env ]; then
|
||||
echo ".env is missing. Run: sh ./scripts/init.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! docker compose version >/dev/null 2>&1; then
|
||||
echo "Docker Compose plugin is required. Install Docker with the 'docker compose' command."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker compose pull
|
||||
docker compose up -d
|
||||
|
||||
if [ "$run_migrate" = "true" ]; then
|
||||
docker compose exec -T web php artisan migrate --force
|
||||
else
|
||||
echo "Migration skipped. Re-run with --migrate when the release requires database migrations."
|
||||
fi
|
||||
|
||||
docker compose ps
|
||||
Reference in New Issue
Block a user