Increase time to consider machine stuck (#211)

* Increase time to consider machine stuck

* Fix standard styling issues
This commit is contained in:
Rafael Taranto 2018-11-15 11:20:26 -02:00 committed by Josh Harvey
parent 599c865f37
commit eb033a4174
2 changed files with 12 additions and 12 deletions

View file

@ -8,7 +8,7 @@ const db = require('./db')
const T = require('./time') const T = require('./time')
const logger = require('./logger') const logger = require('./logger')
const STALE_STATE = 2 * T.minute const STALE_STATE = 7 * T.minute
const NETWORK_DOWN_TIME = 1 * T.minute const NETWORK_DOWN_TIME = 1 * T.minute
const ALERT_SEND_INTERVAL = T.hour const ALERT_SEND_INTERVAL = T.hour
@ -122,7 +122,7 @@ function checkStuckScreen (deviceEvents) {
const age = Math.floor(lastEvent.age) const age = Math.floor(lastEvent.age)
if (age > STALE_STATE) { if (age > STALE_STATE) {
return [{code: STALE, state: state, age: age}] return [{ code: STALE, state, age }]
} }
return [] return []