fix: align live flow contracts and preserve existing result state

Closes #9
This commit is contained in:
Mikhail Chusavitin
2026-02-04 11:38:35 +03:00
parent 53849032fe
commit f6a10d4eac
4 changed files with 163 additions and 25 deletions

View File

@@ -592,8 +592,6 @@ func (s *Server) handleCollectStart(w http.ResponseWriter, r *http.Request) {
}
job := s.jobManager.CreateJob(req)
s.SetResult(newAPIResult(req))
s.SetDetectedVendor("")
s.startMockCollectionJob(job.ID, req)
w.Header().Set("Content-Type", "application/json")
@@ -681,6 +679,8 @@ func (s *Server) startMockCollectionJob(jobID string, req CollectRequest) {
s.jobManager.UpdateJobStatus(jobID, CollectStatusSuccess, 100, "")
s.jobManager.AppendJobLog(jobID, "Сбор завершен")
s.SetResult(newAPIResult(req))
s.SetDetectedVendor("")
}()
}