Browse Source

测试3

dev
wenlele 2 years ago
parent
commit
c08f11f028
  1. 12
      api/app/lib/schedule/alarms_push.js

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

@ -1,7 +1,7 @@
const moment = require('moment') const moment = require('moment')
// let isDev = false let isDev = false
let isDev = true // let isDev = true
let proDebug = false let proDebug = false
proDebug = true proDebug = true
@ -9,8 +9,8 @@ proDebug = true
module.exports = function (app, opts) { module.exports = function (app, opts) {
const alarmsPush = app.fs.scheduleInit( const alarmsPush = app.fs.scheduleInit(
{ {
// interval: '12 */1 * * * *', interval: '12 */1 * * * *',
interval: '12 0 0 0 */1 *', // interval: '12 0 0 0 */1 *',
immediate: isDev, immediate: isDev,
proRun: !isDev, proRun: !isDev,
}, },
@ -1227,16 +1227,12 @@ module.exports = function (app, opts) {
if (x.factor && x.factor.length) { if (x.factor && x.factor.length) {
x.factor.map((f, fi) => { x.factor.map((f, fi) => {
let showOne2 = (fi == 0) ? true : false let showOne2 = (fi == 0) ? true : false
if (f.devices && f.devices.length) { if (f.devices && f.devices.length) {
f.devices.map((c, ci) => { f.devices.map((c, ci) => {
let showOne3 = (ci == 0) ? true : false let showOne3 = (ci == 0) ? true : false
if (c.alarmDatas && c.alarmDatas.length) { if (c.alarmDatas && c.alarmDatas.length) {
c.alarmDatas.map(a => { c.alarmDatas.map(a => {
let tableData = '<tr>' let tableData = '<tr>'
for (let t of alarmTitleArr) { for (let t of alarmTitleArr) {

Loading…
Cancel
Save