Use IsParameterized/isPeriodic methods
This commit is contained in:
parent
81a8f18cac
commit
be36fee48e
|
@ -1403,7 +1403,7 @@ func (n *nomadFSM) reconcileQueuedAllocations(index uint64) error {
|
|||
job := rawJob.(*structs.Job)
|
||||
|
||||
// Nothing to do for queued allocations if the job is a parent periodic/parameterized job
|
||||
if job.ParentID == "" && (job.Periodic != nil || job.ParameterizedJob != nil) {
|
||||
if job.IsParameterized() || job.IsPeriodic() {
|
||||
continue
|
||||
}
|
||||
planner := &scheduler.Harness{
|
||||
|
|
|
@ -3057,8 +3057,7 @@ func (s *StateStore) ReconcileJobSummaries(index uint64) error {
|
|||
}
|
||||
job := rawJob.(*structs.Job)
|
||||
|
||||
if (job.ParameterizedJob != nil || job.Periodic != nil) && job.ParentID == "" {
|
||||
|
||||
if job.IsParameterized() || job.IsPeriodic() {
|
||||
// COMPAT: Remove after 0.11
|
||||
|
||||
// The following block of code fixes incorrect child summaries due to a bug
|
||||
|
|
Loading…
Reference in a new issue