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
+12
View File
@@ -105,6 +105,18 @@ type TemplateScheduleOptions struct {
// LockedTTL dictates the duration after which locked workspaces will be
// permanently deleted.
LockedTTL time.Duration `json:"locked_ttl"`
// UpdateWorkspaceLastUsedAt updates the template's workspaces'
// last_used_at field. This is useful for preventing updates to the
// templates inactivity_ttl immediately triggering a lock action against
// workspaces whose last_used_at field violates the new template
// inactivity_ttl threshold.
UpdateWorkspaceLastUsedAt bool `json:"update_workspace_last_used_at"`
// UpdateWorkspaceLockedAt updates the template's workspaces'
// locked_at field. This is useful for preventing updates to the
// templates locked_ttl immediately triggering a delete action against
// workspaces whose locked_at field violates the new template locked_ttl
// threshold.
UpdateWorkspaceLockedAt bool `json:"update_workspace_locked_at"`
}
// TemplateScheduleStore provides an interface for retrieving template