diff --git a/backend/api/Services/MissionSchedulingService.cs b/backend/api/Services/MissionSchedulingService.cs index 3b67e96c..2d5c46b6 100644 --- a/backend/api/Services/MissionSchedulingService.cs +++ b/backend/api/Services/MissionSchedulingService.cs @@ -71,22 +71,6 @@ public async Task StartNextMissionRunIfSystemIsAvailable(string robotId) signalRService.ReportGeneralFailToSignalR(robot, $"Failed to schedule return to home for robot {robot.Name}", ""); logger.LogError("Failed to schedule a return to home mission for robot {RobotId}", robot.Id); } - - if (missionRun == null) { return; } // The robot is already home - - var postReturnToHomeMissionCreatedRobot = await robotService.ReadById(missionRun.Robot.Id, readOnly: true); - if (postReturnToHomeMissionCreatedRobot == null) - { - logger.LogInformation("Could not find robot {Name}", missionRun.Robot.Name); - return; - } - - logger.LogInformation( - "Post return to home mission created: Robot {robotName} has status {robotStatus} and current area {areaName}", - postReturnToHomeMissionCreatedRobot.Name, - postReturnToHomeMissionCreatedRobot.Status, - postReturnToHomeMissionCreatedRobot.CurrentInspectionArea?.Name - ); } }