feat: ping time internet quality measurement

This commit is contained in:
José Oliveira 2021-08-30 18:40:12 +01:00 committed by Josh Harvey
parent 4f9dc81693
commit 01412e1abe

View file

@ -58,8 +58,8 @@ function addName (pings, events, config) {
getStatus( getStatus(
_.first(pings[machine.deviceId]), _.first(pings[machine.deviceId]),
_.first(checkStuckScreen(events, machine.name)) _.first(checkStuckScreen(events, machine.name))
) )
] ]
return _.assign(machine, { cashOut, statuses }) return _.assign(machine, { cashOut, statuses })
} }
@ -132,8 +132,8 @@ function getMachine (machineId, config) {
})) }))
return Promise.all([queryMachine, dbm.machineEvents(), config]) return Promise.all([queryMachine, dbm.machineEvents(), config])
.then(([machine, events, config]) => { .then(([machine, events, config]) => {
const pings = checkPings([machine]) const pings = checkPings([machine])
return [machine].map(addName(pings, events, config))[0] return [machine].map(addName(pings, events, config))[0]
}) })