Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try to fix release plan cronjob #3934

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func upsertReleasePlanCron(id, name string, index int64, ScheduleExecuteTime int
Name: releasePlanCronName,
Type: setting.ReleasePlanCronjob,
}
input.Enabled = true
input.Enabled = enable
input.Cron = util.UnixStampToCronExpr(ScheduleExecuteTime)
input.ReleasePlanArgs = &commonmodels.ReleasePlanArgs{
ID: id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ func (h *CronjobHandler) updateCronjob(name, productName, jobType string, jobLis
}
// 根据job内容来在scheduler中新增cronjob
for _, job := range jobList {
log.Debugf("job: %+v", job)
var cron string
if job.Type == setting.FixedGapCronjob || job.Type == setting.FixedDayTimeCronjob {
cronString, err := convertFixedTimeToCron(job)
Expand Down Expand Up @@ -193,6 +194,7 @@ func (h *CronjobHandler) updateCronjob(name, productName, jobType string, jobLis
return err
}
case setting.ReleasePlanCronjob:
log.Debugf("registering release plan job, name: %v, cron: %v, jobID: %v", name, cron, job.ID)
err := h.registerReleasePlanJob(name, cron, job)
if err != nil {
return err
Expand Down
Loading