From 5c97282fe332d87ad4d897f96a9a10faa4b132e7 Mon Sep 17 00:00:00 2001 From: andchiind Date: Wed, 18 Dec 2024 10:24:10 +0100 Subject: [PATCH] Remove old logging in mqtt event handler --- backend/api/EventHandlers/MqttEventHandler.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/backend/api/EventHandlers/MqttEventHandler.cs b/backend/api/EventHandlers/MqttEventHandler.cs index 8acd999c..a3911815 100644 --- a/backend/api/EventHandlers/MqttEventHandler.cs +++ b/backend/api/EventHandlers/MqttEventHandler.cs @@ -89,13 +89,7 @@ private async void OnIsarStatus(object? sender, MqttReceivedArgs mqttArgs) if (robot.Status == isarStatus.Status) { return; } - var preUpdatedRobot = await RobotService.ReadByIsarId(isarStatus.IsarId, readOnly: true); - if (preUpdatedRobot == null) - { - _logger.LogInformation("Received message from unknown ISAR instance {Id} with robot name {Name}", isarStatus.IsarId, isarStatus.RobotName); - return; - } - _logger.LogInformation("OnIsarStatus: Robot {robotName} has status {robotStatus} and current inspection area {areaName}", preUpdatedRobot.Name, preUpdatedRobot.Status, preUpdatedRobot.CurrentInspectionArea?.Name); + _logger.LogInformation("OnIsarStatus: Robot {robotName} has status {robotStatus} and current inspection area {areaName}", robot.Name, robot.Status, robot.CurrentInspectionArea?.Name); _updateRobotSemaphore.WaitOne(); _logger.LogDebug("Semaphore acquired for updating robot status");