feat: logs

This commit is contained in:
tbphp
2025-07-08 22:07:29 +08:00
parent b4178cfce1
commit 2126e30f21
2 changed files with 0 additions and 3 deletions

View File

@@ -79,7 +79,6 @@ func (s *KeyCronService) runLoop() {
// submitValidationJobs finds groups and keys that need validation and submits them to the pool.
func (s *KeyCronService) submitValidationJobs() {
logrus.Info("KeyCronService: Starting validation submission cycle.")
var groups []models.Group
if err := s.DB.Find(&groups).Error; err != nil {
logrus.Errorf("KeyCronService: Failed to get groups: %v", err)

View File

@@ -64,11 +64,9 @@ func NewLeaderService(s store.Store) *LeaderService {
// Start performs an initial leader election and starts the background leadership maintenance loop.
func (s *LeaderService) Start() error {
if s.isSingleNode {
logrus.Info("In single-node mode, leadership is assumed. Skipping election process.")
return nil
}
logrus.WithField("nodeID", s.nodeID).Info("Performing initial leader election...")
if err := s.tryToBeLeader(); err != nil {
return fmt.Errorf("initial leader election failed: %w", err)
}