pull/1113/head
akash-sachan 2023-05-12 11:08:39 +05:30
parent eb0a632ece
commit f9c134bfd2
1 changed files with 3 additions and 0 deletions

View File

@ -104,8 +104,11 @@ func hasZeroUpdates(Updates []*incidents.IncidentUpdate) bool {
func checkResolvedVisibility(incidentUpdates []*incidents.IncidentUpdate) bool {
if !(incidentUpdates[len(incidentUpdates)-1].Type == resolved &&
getTimeDiff(incidentUpdates[len(incidentUpdates)-1]) > incidentsTimeoutInMinutes) {
log.Info(fmt.Sprintf("Incident update resolved visibility: %v", true))
return true
}
// This log will also given insight into number of unnecessary incidents fetched from DB
log.Info(fmt.Sprintf("Incident update resolved visibility: %v", false))
return false
}