fix(logging): record cleanup success at info level

This commit is contained in:
Ricardo-binZzz
2026-07-29 13:25:03 +08:00
parent 5a6143097d
commit 0353cdadfe
@@ -15,6 +15,7 @@ import (
"github.com/google/uuid"
"github.com/redis/go-redis/v9"
"github.com/robfig/cron/v3"
"go.uber.org/zap"
)
const (
@@ -285,7 +286,10 @@ func (s *OpsCleanupService) runScheduled() {
return
}
s.recordHeartbeatSuccess(runAt, time.Since(startedAt), counts)
logger.LegacyPrintf("service.ops_cleanup", "[OpsCleanup] cleanup complete: %s", counts)
logger.L().Info("[OpsCleanup] cleanup complete",
zap.String("component", "service.ops_cleanup"),
zap.String("deleted_counts", counts.String()),
)
}
func (s *OpsCleanupService) runCleanupOnce(ctx context.Context) (opsCleanupDeletedCounts, error) {