diff --git a/backend/api/EventHandlers/MissionEventHandler.cs b/backend/api/EventHandlers/MissionEventHandler.cs index 28d55ee96..1fa0050e1 100644 --- a/backend/api/EventHandlers/MissionEventHandler.cs +++ b/backend/api/EventHandlers/MissionEventHandler.cs @@ -111,21 +111,6 @@ private async void OnRobotAvailable(object? sender, RobotAvailableEventArgs e) return; } - if (robot.CurrentMissionId != null) - { - var stuckMission = await MissionService.ReadById(robot.CurrentMissionId!, readOnly: true); - if (stuckMission == null) - { - _logger.LogError("MissionRun with ID: {MissionId} was not found in the database", robot.CurrentMissionId); - return; - } - if (stuckMission.Status == MissionStatus.Ongoing || stuckMission.Status == MissionStatus.Paused) - { - _logger.LogError("Ongoing/paused mission with ID: ${MissionId} is not being run in ISAR", robot.CurrentMissionId); - await MissionService.SetMissionRunToFailed(stuckMission.Id, "Mission failed due to issue with ISAR"); - } - } - _startMissionSemaphore.WaitOne(); try { await MissionScheduling.StartNextMissionRunIfSystemIsAvailable(robot.Id); } catch (MissionRunNotFoundException) { return; }