fix(scheduler): 当前会话的定时任务 ok 通知不再重复推微信
任务会话此刻仍绑在目标 bid 的当前会话上时,本轮收尾回复已由交互投递链 (attachBus)实时送过,notifyTask 按 bid 去重跳过 ok 通知;error 通知 照常(没跑起来的回合并没实时话可推,通知是唯一信号面)。
This commit is contained in:
@@ -164,6 +164,7 @@ function fireNotify(t, status, errNote) {
|
||||
}
|
||||
Promise.resolve(notify({
|
||||
user: t.user, channel: t.notify_channel || '', sessionId: t.session_id,
|
||||
status, // notifyTask 的去重闸门用:ok 且会话仍是该通道当前会话 → 回复已实时投递过,不重发
|
||||
head: '`' + name + ', ' + status + '`\n---\n',
|
||||
text, files, stamp: t.last_run_at || Date.now(),
|
||||
})).catch(e => log.warn('scheduler', '任务通知入队失败: ' + (e && e.message || e)));
|
||||
|
||||
Reference in New Issue
Block a user