fix(api): 修复邮件队列超时并补齐调度进程
延长 SendEmailJob 超时并改为超时直接失败,补充重试退避、 失败日志与收件人脱敏,避免 send_email 队列批量超时重试。 新增 MAIL_TIMEOUT 与 QUEUE_RETRY_AFTER 配置,并抽出邮件运行时 配置与 HTML 内容服务,确保 Horizon 常驻进程使用最新邮件配置。 为 Docker、supervisor 与 compose 样例补齐 scheduler 进程,并在 节点管理端开启墙检测托管时立即触发一次检测,保证定时任务持续生效。
This commit is contained in:
@@ -312,9 +312,22 @@ async function handleBatchSubmit(payload: NodeBatchEditPayload) {
|
||||
|
||||
batchSubmitting.value = true
|
||||
await batchUpdateNodes(updatePayload)
|
||||
let started = 0
|
||||
let skipped = 0
|
||||
if (payload.gfw_check_enabled === true) {
|
||||
const response = await checkNodeGfw(updatePayload.ids)
|
||||
started = response.data?.started?.length ?? 0
|
||||
skipped = response.data?.skipped?.length ?? 0
|
||||
}
|
||||
batchEditVisible.value = false
|
||||
clearSelection()
|
||||
ElMessage.success(`已批量更新 ${updatePayload.ids.length} 个节点`)
|
||||
if (started > 0) {
|
||||
ElMessage.success(`已批量更新 ${updatePayload.ids.length} 个节点,并发起 ${started} 个父节点墙检测`)
|
||||
} else if (payload.gfw_check_enabled === true && skipped > 0) {
|
||||
ElMessage.info('已批量开启墙检测托管,所选父节点已有任务或所选节点为子节点')
|
||||
} else {
|
||||
ElMessage.success(`已批量更新 ${updatePayload.ids.length} 个节点`)
|
||||
}
|
||||
await loadNodeBoard()
|
||||
} catch (error) {
|
||||
if (error === 'cancel' || error === 'close') {
|
||||
@@ -476,7 +489,19 @@ async function handleToggleGfwCheck(node: AdminNodeItem, nextValue: boolean) {
|
||||
id: node.id,
|
||||
gfw_check_enabled: nextValue,
|
||||
})
|
||||
ElMessage.success(nextValue ? '已开启墙检测托管' : '已关闭墙检测托管')
|
||||
if (nextValue && !node.parent_id) {
|
||||
const response = await checkNodeGfw([node.id])
|
||||
const started = response.data?.started?.length ?? 0
|
||||
if (started > 0) {
|
||||
ElMessage.success('已开启墙检测托管,并发起墙状态检测')
|
||||
} else {
|
||||
const reason = response.data?.skipped?.[0]?.reason
|
||||
ElMessage.info(reason || '已开启墙检测托管,已有检测任务等待节点领取或上报')
|
||||
}
|
||||
} else {
|
||||
ElMessage.success(nextValue ? '已开启墙检测托管' : '已关闭墙检测托管')
|
||||
}
|
||||
await loadNodeBoard()
|
||||
} catch (error) {
|
||||
node.gfw_check_enabled = previous
|
||||
ElMessage.error(error instanceof Error ? error.message : '墙检测托管状态更新失败')
|
||||
|
||||
Reference in New Issue
Block a user