chore: remove duplicate procedure

This commit is contained in:
André Sá 2021-10-18 18:34:22 +01:00
parent ff474ee507
commit f570661724

View file

@ -74,14 +74,6 @@ function getMachineNames (config) {
const mergeByDeviceId = (x, y) => _.values(_.merge(_.keyBy('deviceId', x), _.keyBy('deviceId', y))) const mergeByDeviceId = (x, y) => _.values(_.merge(_.keyBy('deviceId', x), _.keyBy('deviceId', y)))
const machines = mergeByDeviceId(mergeByDeviceId(rawMachines, heartbeat), performance) const machines = mergeByDeviceId(mergeByDeviceId(rawMachines, heartbeat), performance)
const getStatus = (ping, stuck) => {
if (ping && ping.age) return unresponsiveStatus
if (stuck && stuck.age) return stuckStatus
return fullyFunctionalStatus
}
const addName = r => { const addName = r => {
const cashOutConfig = configManager.getCashOut(r.deviceId, config) const cashOutConfig = configManager.getCashOut(r.deviceId, config)