Skip to content

Commit

Permalink
Do not log updated recommendation table msg if nothing was done
Browse files Browse the repository at this point in the history
  • Loading branch information
epapbak committed Nov 10, 2023
1 parent 3e07c3a commit 4cc18c2
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -1211,12 +1211,14 @@ func (storage DBStorage) WriteRecommendationsForCluster(
return err
}

log.Info().
Int64("Deleted", deleted).
Int("Inserted", inserted).
Int(organizationKey, int(orgID)).
Str(clusterKey, string(clusterName)).
Msg("Updated recommendation table")
if deleted != 0 || inserted != 0 {
log.Info().
Int64("Deleted", deleted).
Int("Inserted", inserted).
Int(organizationKey, int(orgID)).
Str(clusterKey, string(clusterName)).
Msg("Updated recommendation table")
}
// updateRecommendationsMetrics(string(clusterName), float64(deleted), float64(inserted))

return nil
Expand Down

0 comments on commit 4cc18c2

Please sign in to comment.