@@ -159,13 +159,6 @@ func (e ExptInsightAnalysisServiceImpl) checkAnalysisReportGenStatus(ctx context
159159 return err
160160 }
161161
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-
169162 if status == entity .ReportStatus_Failed {
170163 record .Status = entity .InsightAnalysisStatus_Failed
171164 return e .repo .UpdateAnalysisRecord (ctx , record )
@@ -179,10 +172,10 @@ func (e ExptInsightAnalysisServiceImpl) checkAnalysisReportGenStatus(ctx context
179172 return e .repo .UpdateAnalysisRecord (ctx , record )
180173 }
181174
182- defaultIntervalSecond := 60 * 60 * 1
183- if time .Now ().Unix ()- CreateAt >= int64 (defaultIntervalSecond ) {
184- logs .CtxWarn (ctx , "checkAnalysisReportGenStatus found timeout event, expt_id: %v, record_id: %v" , record .ExptID , record .ID )
175+ // 超过2小时,未生成分析报告,认为是失败
176+ if status == entity .ReportStatus_Running && record .CreatedAt .Add (entity .InsightAnalysisRunningTimeout ).Unix () <= time .Now ().Unix () {
185177 record .Status = entity .InsightAnalysisStatus_Failed
178+ logs .CtxWarn (ctx , "checkAnalysisReportGenStatus found timeout event, expt_id: %v, record_id: %v" , record .ExptID , record .ID )
186179 return e .repo .UpdateAnalysisRecord (ctx , record )
187180 }
188181
0 commit comments