This commit is contained in:
2025-12-15 13:44:50 +01:00
parent 72ce3954b4
commit 104fd1576a
9 changed files with 117 additions and 15 deletions

View File

@@ -2,6 +2,7 @@
// All rights reserved. This file is part of cc-backend.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package taskmanager
import (
@@ -19,7 +20,13 @@ func RegisterCommitJobService() {
} else {
frequency = "2m"
}
d, _ := time.ParseDuration(frequency)
d, err := parseDuration(frequency)
if err != nil {
cclog.Errorf("RegisterCommitJobService: %v", err)
return
}
cclog.Infof("register commitJob service with %s interval", frequency)
s.NewJob(gocron.DurationJob(d),