feat: 调整日志

This commit is contained in:
tbphp
2025-07-11 22:12:49 +08:00
parent ce38f6aaa7
commit d430870dc5
2 changed files with 8 additions and 8 deletions

View File

@@ -102,13 +102,17 @@ func (s *KeyCronService) submitValidationJobs() {
continue
}
if len(keys) == 0 {
lenKey := len(keys)
if lenKey == 0 {
continue
}
total += len(keys)
total += lenKey
logrus.Infof("KeyCronService: Submitting %d keys for group %s for validation.", len(keys), group.Name)
if lenKey > 0 {
logrus.Infof("KeyCronService: Submitting %d keys for group %s for validation.", lenKey, group.Name)
}
for _, key := range keys {
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
@@ -129,10 +133,6 @@ func (s *KeyCronService) submitValidationJobs() {
if len(groupsToUpdateTimestamp) > 0 {
s.updateGroupTimestamps(groupsToUpdateTimestamp, validationStartTime)
}
if total > 0 {
logrus.Infof("KeyCronService: Submitted %d keys for validation across %d groups.", total, len(groupsToUpdateTimestamp))
}
}
func (s *KeyCronService) updateGroupTimestamps(groups map[uint]*models.Group, validationStartTime time.Time) {