fix(api): 修复邮件队列超时并补齐调度进程
延长 SendEmailJob 超时并改为超时直接失败,补充重试退避、 失败日志与收件人脱敏,避免 send_email 队列批量超时重试。 新增 MAIL_TIMEOUT 与 QUEUE_RETRY_AFTER 配置,并抽出邮件运行时 配置与 HTML 内容服务,确保 Horizon 常驻进程使用最新邮件配置。 为 Docker、supervisor 与 compose 样例补齐 scheduler 进程,并在 节点管理端开启墙检测托管时立即触发一次检测,保证定时任务持续生效。
This commit is contained in:
@@ -106,12 +106,14 @@ fi
|
||||
: "${HORIZON_WORKER_MEMORY_MB:=$auto_horizon_mem}"
|
||||
: "${HORIZON_WORKER_MAX_TIME:=0}"
|
||||
: "${HORIZON_WORKER_MAX_JOBS:=0}"
|
||||
: "${ENABLE_WEB:=true}"
|
||||
: "${ENABLE_SCHEDULE:=$ENABLE_WEB}"
|
||||
|
||||
export OCTANE_WORKERS OCTANE_TASK_WORKERS OCTANE_MAX_REQUESTS \
|
||||
OCTANE_GARBAGE_MB OCTANE_MAX_EXECUTION_TIME \
|
||||
HORIZON_DATA_PIPELINE_MAX HORIZON_BUSINESS_MAX HORIZON_NOTIFICATION_MAX \
|
||||
HORIZON_WORKER_MEMORY_MB HORIZON_WORKER_MAX_TIME HORIZON_WORKER_MAX_JOBS \
|
||||
RESOURCE_PROFILE
|
||||
RESOURCE_PROFILE ENABLE_SCHEDULE
|
||||
|
||||
echo "[entrypoint] Auto-tune (profile=${RESOURCE_PROFILE}): cpus=${CPUS} mem=${MEM_MIB}MiB slots=${SLOTS} -> octane=${OCTANE_WORKERS} horizon(dp/biz/notif)=${HORIZON_DATA_PIPELINE_MAX}/${HORIZON_BUSINESS_MAX}/${HORIZON_NOTIFICATION_MAX} horizon_worker_mem=${HORIZON_WORKER_MEMORY_MB}MB"
|
||||
echo "[entrypoint] Horizon supervisors use balance=auto with minProcesses=1, so they scale up to the cap on demand and back down when idle."
|
||||
@@ -143,7 +145,7 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "[entrypoint] Starting services (caddy=${ENABLE_CADDY} web=${ENABLE_WEB} horizon=${ENABLE_HORIZON} ws=${ENABLE_WS_SERVER})..."
|
||||
echo "[entrypoint] Starting services (caddy=${ENABLE_CADDY} web=${ENABLE_WEB} horizon=${ENABLE_HORIZON} scheduler=${ENABLE_SCHEDULE} ws=${ENABLE_WS_SERVER})..."
|
||||
# Drop stale Octane/WorkerMan state files so the new master does not signal
|
||||
# PIDs left over from a previous container run (causes Swoole kill EPERM).
|
||||
rm -f /www/storage/logs/octane-server-state.json /www/storage/logs/xboard-ws-server.pid 2>/dev/null || true
|
||||
|
||||
Reference in New Issue
Block a user