mirror of
https://github.com/grafana/grafana.git
synced 2025-01-09 23:53:25 -06:00
Annotations: Remove extraneous, debug log messages (#80670)
* drop log messages * Revert timer * fix returns, no need to capture vars for log lines anymore
This commit is contained in:
parent
7b8db643a3
commit
68d4e8a930
@ -531,11 +531,8 @@ func (r *xormRepositoryImpl) CleanAnnotations(ctx context.Context, cfg setting.A
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
r.log.Error("Annotations to clean by time", "count", len(ids), "ids", ids, "cond", cond, "err", err)
|
|
||||||
|
|
||||||
x, y := r.deleteByIDs(ctx, "annotation", ids)
|
return r.deleteByIDs(ctx, "annotation", ids)
|
||||||
r.log.Error("cleaned annotations by time", "count", len(ids), "affected", x, "err", y)
|
|
||||||
return x, y
|
|
||||||
})
|
})
|
||||||
totalAffected += affected
|
totalAffected += affected
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -551,11 +548,8 @@ func (r *xormRepositoryImpl) CleanAnnotations(ctx context.Context, cfg setting.A
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
r.log.Error("Annotations to clean by count", "count", len(ids), "ids", ids, "cond", cond, "err", err)
|
|
||||||
|
|
||||||
x, y := r.deleteByIDs(ctx, "annotation", ids)
|
return r.deleteByIDs(ctx, "annotation", ids)
|
||||||
r.log.Error("cleaned annotations by count", "count", len(ids), "affected", x, "err", y)
|
|
||||||
return x, y
|
|
||||||
})
|
})
|
||||||
totalAffected += affected
|
totalAffected += affected
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -573,11 +567,8 @@ func (r *xormRepositoryImpl) CleanOrphanedAnnotationTags(ctx context.Context) (i
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
r.log.Error("Tags to clean", "count", len(ids), "ids", ids, "cond", cond, "err", err)
|
|
||||||
|
|
||||||
x, y := r.deleteByIDs(ctx, "annotation_tag", ids)
|
return r.deleteByIDs(ctx, "annotation_tag", ids)
|
||||||
r.log.Error("cleaned tags", "count", len(ids), "affected", x, "err", y)
|
|
||||||
return x, y
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ func (j cleanUpJob) String() string {
|
|||||||
func (srv *CleanUpService) Run(ctx context.Context) error {
|
func (srv *CleanUpService) Run(ctx context.Context) error {
|
||||||
srv.cleanUpTmpFiles(ctx)
|
srv.cleanUpTmpFiles(ctx)
|
||||||
|
|
||||||
ticker := time.NewTicker(time.Minute * 1)
|
ticker := time.NewTicker(time.Minute * 10)
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-ticker.C:
|
case <-ticker.C:
|
||||||
|
Loading…
Reference in New Issue
Block a user