Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions pkg/controller/cronmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,12 @@ func (cm *CronManager) GC() {
}
}

log.Warningf("Failed to find job %s of cronHPA %s in %s in cron engine and resubmit the job.", job.Name(), hpa.Name, hpa.Namespace)
cm.cronExecutor.AddJob(job)

cm.Lock()
if _, ok := cm.jobQueue[job.ID()]; ok {
log.Warningf("Failed to find job %s of cronHPA %s in %s in cron engine and resubmit the job.", job.Name(), hpa.Name, hpa.Namespace)
cm.cronExecutor.AddJob(job)
}
cm.Unlock()
// metrics update
// when one job is not in cron engine but in crd.
// That means the job is failed and need to be resubmitted.
Expand Down