Skip to content
Snippets Groups Projects
Commit e25a364d authored by Eric Chiang's avatar Eric Chiang Committed by GitHub
Browse files

Merge pull request #611 from ericchiang/dev-gc-reduce-verbosity

server: only print gc stats if something has been removed
parents 7288e49c 89ecfd2e
No related branches found
No related tags found
No related merge requests found
...@@ -273,7 +273,7 @@ func startGarbageCollection(ctx context.Context, s storage.Storage, frequency ti ...@@ -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)
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment