server: only print gc stats if something has been removed
This commit is contained in:
parent
7288e49c19
commit
89ecfd2ede
1 changed files with 1 additions and 1 deletions
|
@ -273,7 +273,7 @@ func startGarbageCollection(ctx context.Context, s storage.Storage, frequency ti
|
||||||
case <-time.After(frequency):
|
case <-time.After(frequency):
|
||||||
if r, err := s.GarbageCollect(now()); err != nil {
|
if r, err := s.GarbageCollect(now()); err != nil {
|
||||||
log.Printf("garbage collection failed: %v", err)
|
log.Printf("garbage collection failed: %v", err)
|
||||||
} else {
|
} else if r.AuthRequests > 0 || r.AuthCodes > 0 {
|
||||||
log.Printf("garbage collection run, delete auth requests=%d, auth codes=%d", r.AuthRequests, r.AuthCodes)
|
log.Printf("garbage collection run, delete auth requests=%d, auth codes=%d", r.AuthRequests, r.AuthCodes)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue