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:
Alexander Weaver 2024-01-16 14:48:11 -06:00 committed by GitHub
parent 7b8db643a3
commit 68d4e8a930
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 13 deletions

View File

@ -531,11 +531,8 @@ func (r *xormRepositoryImpl) CleanAnnotations(ctx context.Context, cfg setting.A
if err != nil {
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)
r.log.Error("cleaned annotations by time", "count", len(ids), "affected", x, "err", y)
return x, y
return r.deleteByIDs(ctx, "annotation", ids)
})
totalAffected += affected
if err != nil {
@ -551,11 +548,8 @@ func (r *xormRepositoryImpl) CleanAnnotations(ctx context.Context, cfg setting.A
if err != nil {
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)
r.log.Error("cleaned annotations by count", "count", len(ids), "affected", x, "err", y)
return x, y
return r.deleteByIDs(ctx, "annotation", ids)
})
totalAffected += affected
if err != nil {
@ -573,11 +567,8 @@ func (r *xormRepositoryImpl) CleanOrphanedAnnotationTags(ctx context.Context) (i
if err != nil {
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)
r.log.Error("cleaned tags", "count", len(ids), "affected", x, "err", y)
return x, y
return r.deleteByIDs(ctx, "annotation_tag", ids)
})
}

View File

@ -74,7 +74,7 @@ func (j cleanUpJob) String() string {
func (srv *CleanUpService) Run(ctx context.Context) error {
srv.cleanUpTmpFiles(ctx)
ticker := time.NewTicker(time.Minute * 1)
ticker := time.NewTicker(time.Minute * 10)
for {
select {
case <-ticker.C: