Skip to content

Commit

Permalink
dispatched parameterized job should clear status too
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahmood Ali committed Mar 25, 2021
1 parent 032945b commit d81df3d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nomad/job_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -1887,13 +1887,15 @@ func (j *Job) Dispatch(args *structs.JobDispatchRequest, reply *structs.JobDispa
return err
}

// Derive the child job and commit it via Raft
// Derive the child job and commit it via Raft - with initial status
dispatchJob := parameterizedJob.Copy()
dispatchJob.ID = structs.DispatchedID(parameterizedJob.ID, time.Now())
dispatchJob.ParentID = parameterizedJob.ID
dispatchJob.Name = dispatchJob.ID
dispatchJob.SetSubmitTime()
dispatchJob.Dispatched = true
dispatchJob.Status = ""
dispatchJob.StatusDescription = ""

// Merge in the meta data
for k, v := range args.Meta {
Expand Down

0 comments on commit d81df3d

Please sign in to comment.