mirror of
https://github.com/kemko/nomad.git
synced 2026-01-07 19:05:42 +03:00
Simplified based on review comments
This commit is contained in:
@@ -374,13 +374,9 @@ type Task struct {
|
||||
|
||||
func (t *Task) Canonicalize(tg *TaskGroup, job *Job) {
|
||||
if t.Resources == nil {
|
||||
var r Resources
|
||||
r.Canonicalize()
|
||||
t.Resources = &r
|
||||
} else {
|
||||
t.Resources.Canonicalize()
|
||||
t.Resources = &Resources{}
|
||||
}
|
||||
|
||||
t.Resources.Canonicalize()
|
||||
if t.KillTimeout == nil {
|
||||
t.KillTimeout = helper.TimeToPtr(5 * time.Second)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user