From 6c0b2b6075cf8a34e6ca6f080d0b0eb88e669500 Mon Sep 17 00:00:00 2001 From: CODE <1650192445@qq.com> Date: Mon, 11 Sep 2023 17:24:35 +0800 Subject: [PATCH] alarm push debug --- api/app/lib/schedule/alarms_push.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/app/lib/schedule/alarms_push.js b/api/app/lib/schedule/alarms_push.js index 0e56f7e..bc80db5 100644 --- a/api/app/lib/schedule/alarms_push.js +++ b/api/app/lib/schedule/alarms_push.js @@ -98,7 +98,8 @@ module.exports = function (app, opts) { } pLog('EM推送列表_' + configListRes.length,); - + pLog(`当前时间:${moment().format('YYYY-MM-DD HH:mm:ss')}`); + pLog(`curMinOfYear / ${curMinOfYear}`) for (let { dataValues: c } of configListRes) { if (c.tacticsParams && c.tactics) { @@ -106,7 +107,7 @@ module.exports = function (app, opts) { // pomsProjectId 是个数组 [] const { strucId, pomsProjectId, pomsStrucFactorId } = c const { interval, deviceProportion } = c.tacticsParams - + pLog(`interval / ${interval} /${curMinOfYear % parseInt(interval)}`) if (curMinOfYear % parseInt(interval) == 0 || isDev) { pLog(`符合时间断点`) const corPomsProject = pomsProjectRes.filter(poms => pomsProjectId.includes(poms.id)) @@ -886,7 +887,7 @@ module.exports = function (app, opts) { let dataAlarmDetails = [] pLog(`查得数据告警 ${dataAlarms.length} 条`); - pLog(dataAlarms); + // pLog(dataAlarms); if (dataAlarms.length) { const alarmIds = dataAlarms @@ -1596,7 +1597,6 @@ module.exports = function (app, opts) { if (emails.length) { pLog(`推送给${emails.length}人`); - pLog(moment().format()) await pushByEmail({ email: emails, title: emailTitle,