aa
This commit is contained in:
@@ -1072,3 +1072,19 @@ func ResetJobTimers() {
|
||||
tasksch.HandleTask(task, nil, true).Run()
|
||||
task.GetID()
|
||||
}
|
||||
|
||||
func UpdateJobSpan(ctx *jxcontext.Context, jobIDs []int, span int) (err error) {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
)
|
||||
for _, v := range jobIDs {
|
||||
job := &model.Job{}
|
||||
job.ID = v
|
||||
err = dao.GetEntity(db, job)
|
||||
if job != nil {
|
||||
job.JobSpan = job.JobSpan | span
|
||||
dao.UpdateEntity(db, job, "JobSpan")
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user