feat: allow templates to specify max_ttl or autostop_requirement (#10920)

This commit is contained in:
Dean Sheather
2023-12-15 00:27:56 -08:00
committed by GitHub
parent 30f032d282
commit b36071c6bb
46 changed files with 699 additions and 495 deletions

View File

@ -431,7 +431,7 @@ func (api *API) postWorkspacesByOrganization(rw http.ResponseWriter, r *http.Req
}
maxTTL := templateSchedule.MaxTTL
if templateSchedule.UseAutostopRequirement {
if !templateSchedule.UseMaxTTL {
// If we're using autostop requirements, there isn't a max TTL.
maxTTL = 0
}
@ -787,7 +787,7 @@ func (api *API) putWorkspaceTTL(rw http.ResponseWriter, r *http.Request) {
}
maxTTL := templateSchedule.MaxTTL
if templateSchedule.UseAutostopRequirement {
if !templateSchedule.UseMaxTTL {
// If we're using autostop requirements, there isn't a max TTL.
maxTTL = 0
}