Fix check pings query

This commit is contained in:
Rafael Taranto 2019-05-13 23:41:21 -03:00 committed by Josh Harvey
parent 1a467707e8
commit 15c8e0d862
3 changed files with 15 additions and 2 deletions

View file

@ -128,7 +128,7 @@ function checkStuckScreen (deviceEvents, machineName) {
}
function checkPing (device) {
const sql = `select (EXTRACT(EPOCH FROM (now() - created))) * 1000 AS age from machine_pings
const sql = `select (EXTRACT(EPOCH FROM (now() - updated))) * 1000 AS age from machine_pings
where device_id=$1`
const deviceId = device.deviceId
return db.oneOrNone(sql, [deviceId])