mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: remove max_ttl from templates (#12644)
* chore: remove max_ttl from templates Completely removing max_ttl as a feature on template scheduling. Must use other template scheduling features to achieve autostop.
This commit is contained in:
@@ -673,8 +673,6 @@ func ConvertTemplate(dbTemplate database.Template) Template {
|
||||
// Some of these fields are meant to be accessed using a specialized
|
||||
// interface (for entitlement purposes), but for telemetry purposes
|
||||
// there's minimal harm accessing them directly.
|
||||
UseMaxTTL: dbTemplate.UseMaxTtl,
|
||||
MaxTTLMillis: time.Duration(dbTemplate.MaxTTL).Milliseconds(),
|
||||
DefaultTTLMillis: time.Duration(dbTemplate.DefaultTTL).Milliseconds(),
|
||||
AllowUserCancelWorkspaceJobs: dbTemplate.AllowUserCancelWorkspaceJobs,
|
||||
AllowUserAutostart: dbTemplate.AllowUserAutostart,
|
||||
@@ -919,8 +917,6 @@ type Template struct {
|
||||
Name string `json:"name"`
|
||||
Description bool `json:"description"`
|
||||
|
||||
UseMaxTTL bool `json:"use_max_ttl"`
|
||||
MaxTTLMillis int64 `json:"max_ttl_ms"`
|
||||
DefaultTTLMillis int64 `json:"default_ttl_ms"`
|
||||
AllowUserCancelWorkspaceJobs bool `json:"allow_user_cancel_workspace_jobs"`
|
||||
AllowUserAutostart bool `json:"allow_user_autostart"`
|
||||
|
||||
Reference in New Issue
Block a user