fix date bug
This commit is contained in:
parent
fefeedb086
commit
1a93d6ae02
4 changed files with 17 additions and 4 deletions
|
|
@ -35,9 +35,12 @@ function checkPing (deviceEvents) {
|
|||
var NETWORK_DOWN_TIME = 2 * 60 * 1000
|
||||
|
||||
if (!lastEvent) {
|
||||
return []
|
||||
return [{code: 'ping'}]
|
||||
}
|
||||
|
||||
console.log('DEBUG6')
|
||||
console.log(lastEvent)
|
||||
|
||||
if (lastEvent.age > NETWORK_DOWN_TIME) {
|
||||
return [{code: 'ping'}]
|
||||
}
|
||||
|
|
@ -100,8 +103,11 @@ function checkStatus (cb) {
|
|||
})
|
||||
|
||||
console.log('DEVICE: ' + deviceRow.fingerprint)
|
||||
alerts = R.concat(alerts, checkStuckScreen(deviceRow, deviceEvents))
|
||||
alerts = R.concat(alerts, checkPing(deviceRow, deviceEvents))
|
||||
alerts = R.concat(alerts, checkStuckScreen(deviceEvents))
|
||||
alerts = R.concat(alerts, checkPing(deviceEvents))
|
||||
|
||||
console.log(deviceFingerprint)
|
||||
console.log(alerts)
|
||||
|
||||
// TODO: Use promises to do this right
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue