Browse Source

告警推送++

dev
CODE 1 year ago
parent
commit
b016476b80
  1. 8
      api/app/lib/schedule/alarms_push.js

8
api/app/lib/schedule/alarms_push.js

@ -105,9 +105,9 @@ module.exports = function (app, opts) {
pLog(`curMinOfYear / ${curMinOfYear}`)
for (let { dataValues: c } of configListRes) {
// if (isDev && c.id != 94) {
// continue
// }
if (isDev && c.id != 94) {
continue
}
if (c.tacticsParams && c.tactics) {
pLog(`当前运行EM配置:id=${c.id} name=${c.name}`);
@ -1310,9 +1310,9 @@ module.exports = function (app, opts) {
let matchedAlarmIds = []
// 这一步能被分配的告警应该也能最终体现在邮件中
let deviceRepeatMap = {}
equipment.map(f => {
f.alarmDatas = []
let deviceRepeatMap = {}
alarmDatas.map(r => {
if (r.sourceId == f.iotaDeviceId) {
if (!deviceRepeatMap[r.sourceId]) {

Loading…
Cancel
Save