update structs with lifecycle

This commit is contained in:
Mahmood Ali
2019-10-11 13:25:32 -04:00
parent a556c0d923
commit 98cc65b68c
3 changed files with 61 additions and 3 deletions

View File

@@ -924,6 +924,13 @@ func ApiTaskToStructsTask(apiTask *api.Task, structsTask *structs.Task) {
File: apiTask.DispatchPayload.File,
}
}
if apiTask.Lifecycle != nil {
structsTask.Lifecycle = &structs.TaskLifecycleConfig{
RunLevel: apiTask.Lifecycle.RunLevel,
BlockUntil: apiTask.Lifecycle.BlockUntil,
}
}
}
func ApiResourcesToStructs(in *api.Resources) *structs.Resources {