mirror of
https://github.com/grafana/grafana.git
synced 2024-11-23 09:26:43 -06:00
Annotations: don't log context.Cancelled as an error when cleaning up (#39024)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
This commit is contained in:
parent
b56bf83c19
commit
d19f33b52f
@ -2,6 +2,7 @@ package cleanup
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
@ -67,7 +68,7 @@ func (srv *CleanUpService) Run(ctx context.Context) error {
|
||||
func (srv *CleanUpService) cleanUpOldAnnotations(ctx context.Context) {
|
||||
cleaner := annotations.GetAnnotationCleaner()
|
||||
affected, affectedTags, err := cleaner.CleanAnnotations(ctx, srv.Cfg)
|
||||
if err != nil {
|
||||
if err != nil && !errors.Is(err, context.DeadlineExceeded) {
|
||||
srv.log.Error("failed to clean up old annotations", "error", err)
|
||||
} else {
|
||||
srv.log.Debug("Deleted excess annotations", "annotations affected", affected, "annotation tags affected", affectedTags)
|
||||
|
Loading…
Reference in New Issue
Block a user