From dec172576ca02a554ded698c2308c1a6f42d6fac Mon Sep 17 00:00:00 2001 From: siiky Date: Tue, 1 Jul 2025 18:55:06 +0100 Subject: [PATCH] refactor: clarify machine pings object construction --- packages/server/lib/notifier/index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/server/lib/notifier/index.js b/packages/server/lib/notifier/index.js index a45ac7d4..f0db3cfe 100644 --- a/packages/server/lib/notifier/index.js +++ b/packages/server/lib/notifier/index.js @@ -107,9 +107,7 @@ function buildAlerts(pings, balances, events, devices) { } function checkPings(devices) { - const deviceIds = _.map('deviceId', devices) - const pings = _.map(utils.checkPing, devices) - return _.zipObject(deviceIds)(pings) + return Object.fromEntries(devices.map(d => [d.deviceId, utils.checkPing(d)])) } function checkStuckScreen(deviceEvents, machine) {