feat: logs
This commit is contained in:
@@ -79,7 +79,6 @@ func (s *KeyCronService) runLoop() {
|
|||||||
|
|
||||||
// submitValidationJobs finds groups and keys that need validation and submits them to the pool.
|
// submitValidationJobs finds groups and keys that need validation and submits them to the pool.
|
||||||
func (s *KeyCronService) submitValidationJobs() {
|
func (s *KeyCronService) submitValidationJobs() {
|
||||||
logrus.Info("KeyCronService: Starting validation submission cycle.")
|
|
||||||
var groups []models.Group
|
var groups []models.Group
|
||||||
if err := s.DB.Find(&groups).Error; err != nil {
|
if err := s.DB.Find(&groups).Error; err != nil {
|
||||||
logrus.Errorf("KeyCronService: Failed to get groups: %v", err)
|
logrus.Errorf("KeyCronService: Failed to get groups: %v", err)
|
||||||
|
@@ -64,11 +64,9 @@ func NewLeaderService(s store.Store) *LeaderService {
|
|||||||
// Start performs an initial leader election and starts the background leadership maintenance loop.
|
// Start performs an initial leader election and starts the background leadership maintenance loop.
|
||||||
func (s *LeaderService) Start() error {
|
func (s *LeaderService) Start() error {
|
||||||
if s.isSingleNode {
|
if s.isSingleNode {
|
||||||
logrus.Info("In single-node mode, leadership is assumed. Skipping election process.")
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
logrus.WithField("nodeID", s.nodeID).Info("Performing initial leader election...")
|
|
||||||
if err := s.tryToBeLeader(); err != nil {
|
if err := s.tryToBeLeader(); err != nil {
|
||||||
return fmt.Errorf("initial leader election failed: %w", err)
|
return fmt.Errorf("initial leader election failed: %w", err)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user