feat: 优化领导者服务

This commit is contained in:
tbphp
2025-07-08 21:10:06 +08:00
parent 7340cdded1
commit fe3fd9c14a
4 changed files with 90 additions and 34 deletions

View File

@@ -55,6 +55,10 @@ func (s *KeyCronService) Stop() {
func (s *KeyCronService) runLoop() {
defer s.wg.Done()
if s.LeaderService.IsLeader() {
s.submitValidationJobs()
}
ticker := time.NewTicker(5 * time.Minute)
defer ticker.Stop()