File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
backend/modules/evaluation/domain/service Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,15 @@ func (e ExptInsightAnalysisServiceImpl) GetAnalysisRecordByID(ctx context.Contex
207207 return nil , err
208208 }
209209
210+ if analysisRecord .Status == entity .InsightAnalysisStatus_Running && analysisRecord .CreatedAt .Add (entity .ThreeHour ).Unix () < time .Now ().Unix () {
211+ analysisRecord .Status = entity .InsightAnalysisStatus_Failed
212+ err = e .repo .UpdateAnalysisRecord (ctx , analysisRecord )
213+ if err != nil {
214+ logs .CtxError (ctx , "GetAnalysisRecordByID: UpdateAnalysisRecord failed: %v" , err )
215+ }
216+ return analysisRecord , err
217+ }
218+
210219 if analysisRecord .Status == entity .InsightAnalysisStatus_Running ||
211220 analysisRecord .Status == entity .InsightAnalysisStatus_Failed {
212221 return analysisRecord , nil
You can’t perform that action at this time.
0 commit comments