Skip to content

Commit fabb0ea

Browse files
committed
insight_analysis record timeout set to 2hour
1 parent 1b59b03 commit fabb0ea

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

backend/modules/evaluation/domain/service/insight_analysis_impl.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,6 @@ func (e ExptInsightAnalysisServiceImpl) checkAnalysisReportGenStatus(ctx context
158158
if err != nil {
159159
return err
160160
}
161-
162-
// 超过3小时,未生成分析报告,认为是失败
163-
if status == entity.ReportStatus_Running && record.CreatedAt.Add(entity.InsightAnalysisRunningTimeout).Unix() <= time.Now().Unix() {
164-
record.Status = entity.InsightAnalysisStatus_Failed
165-
logs.CtxWarn(ctx, "checkAnalysisReportGenStatus found timeout event, expt_id: %v, record_id: %v", record.ExptID, record.ID)
166-
return e.repo.UpdateAnalysisRecord(ctx, record)
167-
}
168-
169161
if status == entity.ReportStatus_Failed {
170162
record.Status = entity.InsightAnalysisStatus_Failed
171163
return e.repo.UpdateAnalysisRecord(ctx, record)
@@ -179,7 +171,7 @@ func (e ExptInsightAnalysisServiceImpl) checkAnalysisReportGenStatus(ctx context
179171
return e.repo.UpdateAnalysisRecord(ctx, record)
180172
}
181173

182-
defaultIntervalSecond := 60 * 60 * 1
174+
defaultIntervalSecond := 120 * 60 * 1
183175
if time.Now().Unix()-CreateAt >= int64(defaultIntervalSecond) {
184176
logs.CtxWarn(ctx, "checkAnalysisReportGenStatus found timeout event, expt_id: %v, record_id: %v", record.ExptID, record.ID)
185177
record.Status = entity.InsightAnalysisStatus_Failed

0 commit comments

Comments
 (0)