Closed tsundvoll closed 8 months ago
Worked when scheduling a batch of missions. Then when scheduling a new batch again, the system did not schedule a localization mission and was held up.
Bug was that the _scheduleLocalizationSemaphore did not release after the first MissionService.PendingLocalizationMissionRunExists(missionRun.Robot.Id)) returned true as it returned outside of the try block with finally to release the semaphore.
Added the following to fix it:
Describe the bug The robot was available and not localized. There was a lingering mission in the Mission Queue (for reasons described a bit below). Then two new missions was added to the Mission Queue and nothing happened (no localization mission was started and the flow seems frozen) and the robot remains Available and currentArea: null.
From the logs in backend:
To Reproduce Steps to reproduce the behavior:
Expected behavior When adding a new mission to the queue; if the robot is not localized and Available, a localization mission should always be started.
Screenshots