report if state is idle
This commit is contained in:
parent
1a93d6ae02
commit
4b5b460d12
2 changed files with 5 additions and 4 deletions
|
|
@ -52,7 +52,6 @@ function checkStuckScreen (deviceEvents) {
|
|||
var sortedEvents = R.sortBy(R.compose(toInt10, R.prop('device_time')), R.map(jsonParse, deviceEvents))
|
||||
var noRepeatEvents = R.dropRepeatsWith(sameState, sortedEvents)
|
||||
var lastEvent = R.last(noRepeatEvents)
|
||||
var IDLE_STATES = ['idle', 'dualIdle']
|
||||
var STALE_STATE = 60 * 1000
|
||||
|
||||
if (!lastEvent) {
|
||||
|
|
@ -60,7 +59,9 @@ function checkStuckScreen (deviceEvents) {
|
|||
}
|
||||
|
||||
var state = lastEvent.note.state
|
||||
if (R.contains(state, IDLE_STATES)) {
|
||||
var isIdle = lastEvent.note.isIdle
|
||||
|
||||
if (isIdle) {
|
||||
return []
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue