Browse Source

优化推送逻辑

release_1.1.2
巴林闲侠 2 years ago
parent
commit
114804bce6
  1. 0
      code/VideoAccess-VCMP/api/app/lib/controllers/application/auth.js
  2. 6
      code/VideoAccess-VCMP/api/app/lib/schedule/cameraStatePush.js

0
code/VideoAccess-VCMP/api/app/lib/controllers/application/auth.js

6
code/VideoAccess-VCMP/api/app/lib/schedule/cameraStatePush.js

@ -33,7 +33,7 @@ module.exports = function (app, opts) {
],
})
const timeNow = moment().format()
const timeNow = moment().startOf('minute').format()
for (let c of configRes) {
// 查配置信息所对应的摄像头15min内的在离线状态
const cameraIds = c.cameraStatusPushMonitors.map(m => m.cameraId)
@ -120,7 +120,7 @@ module.exports = function (app, opts) {
// camera: cameraIds,
}
// 离线推送
console.log('object');
console.log('离线推送', pushWay, offArr, onArr, receiver,);
if (offArr.length && c.noticeWay && c.noticeWay.includes('offline') && receiver.length) {
if (c.pushWay == 'email') {
// 邮件
@ -239,7 +239,7 @@ module.exports = function (app, opts) {
}
}
} catch (error) {
console.error(error);
console.error('15min 上下线推送错误:', error);
}
}
)

Loading…
Cancel
Save