Skip to content

Commit

Permalink
canonicalize restart policy for sysbatch
Browse files Browse the repository at this point in the history
  • Loading branch information
schmichael committed Jan 17, 2025
1 parent df1a994 commit 3c91c19
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions nomad/structs/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -6586,14 +6586,13 @@ func (r *RestartPolicy) Validate() error {

func NewRestartPolicy(jobType string) *RestartPolicy {
switch jobType {
case JobTypeService, JobTypeSystem:
rp := DefaultServiceJobRestartPolicy
return &rp
case JobTypeBatch:
case JobTypeBatch, JobTypeSysBatch:
rp := DefaultBatchJobRestartPolicy
return &rp
default:
rp := DefaultServiceJobRestartPolicy
return &rp
}
return nil
}

const ReschedulePolicyMinInterval = 15 * time.Second
Expand Down

0 comments on commit 3c91c19

Please sign in to comment.