mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
feat: allow templates to specify max_ttl or autostop_requirement (#10920)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user