feat: add activity bumping to template scheduling (#9040)

This commit is contained in:
Jon Ayers
2023-08-22 15:15:13 -05:00
committed by GitHub
parent 6214117d3d
commit 6e41cd1eda
30 changed files with 672 additions and 193 deletions
+9
View File
@@ -192,6 +192,15 @@ type UpdateTemplateMeta struct {
FailureTTLMillis int64 `json:"failure_ttl_ms,omitempty"`
InactivityTTLMillis int64 `json:"inactivity_ttl_ms,omitempty"`
LockedTTLMillis int64 `json:"locked_ttl_ms,omitempty"`
// UpdateWorkspaceLastUsedAt updates the last_used_at field of workspaces
// spawned from the template. This is useful for preventing workspaces being
// immediately locked when updating the inactivity_ttl field to a new, shorter
// value.
UpdateWorkspaceLastUsedAt bool `json:"update_workspace_last_used_at"`
// UpdateWorkspaceLockedAt updates the locked_at field of workspaces spawned
// from the template. This is useful for preventing locked workspaces being immediately
// deleted when updating the locked_ttl field to a new, shorter value.
UpdateWorkspaceLockedAt bool `json:"update_workspace_locked_at"`
}
type TemplateExample struct {