code refactor

This commit is contained in:
MaysWind
2025-08-04 20:43:33 +08:00
parent d35e127b9e
commit 84523d8b8a
18 changed files with 163 additions and 95 deletions
+1 -1
View File
@@ -95,7 +95,7 @@ func TestCronJobSchedulerContainerRepeatRun(t *testing.T) {
InMemoryDuplicateCheckerCleanupIntervalDuration: 60 * time.Second,
})
duplicatechecker.Container.Current = checker
duplicatechecker.SetDuplicateChecker(checker)
container := &CronJobSchedulerContainer{
allJobsMap: make(map[string]*CronJob),
+1 -1
View File
@@ -22,7 +22,7 @@ func (j *CronJob) doRun() {
start := time.Now()
c := core.NewCronJobContext(j.Name, j.Period.GetInterval())
if duplicatechecker.Container.Current != nil {
if duplicatechecker.Container.IsEnabled() {
localAddr, err := utils.GetLocalIPAddressesString()
if err != nil {