@@ -114,38 +114,38 @@ func VerifyTemplateAutostartRequirement(days uint8) error {
114
114
}
115
115
116
116
type TemplateScheduleOptions struct {
117
- UserAutostartEnabled bool `json:"user_autostart_enabled"`
118
- UserAutostopEnabled bool `json:"user_autostop_enabled"`
119
- DefaultTTL time.Duration `json:"default_ttl"`
117
+ UserAutostartEnabled bool
118
+ UserAutostopEnabled bool
119
+ DefaultTTL time.Duration
120
120
// ActivityBump dictates the duration to bump the workspace's deadline by if
121
121
// Coder detects activity from the user. A value of 0 means no bumping.
122
- ActivityBump time.Duration `json:"activity_bump"`
122
+ ActivityBump time.Duration
123
123
// AutostopRequirement dictates when the workspace must be restarted. This
124
124
// used to be handled by MaxTTL.
125
- AutostopRequirement TemplateAutostopRequirement `json:"autostop_requirement"`
125
+ AutostopRequirement TemplateAutostopRequirement
126
126
// AutostartRequirement dictates when the workspace can be auto started.
127
- AutostartRequirement TemplateAutostartRequirement `json:"autostart_requirement"`
127
+ AutostartRequirement TemplateAutostartRequirement
128
128
// FailureTTL dictates the duration after which failed workspaces will be
129
129
// stopped automatically.
130
- FailureTTL time.Duration `json:"failure_ttl"`
130
+ FailureTTL time.Duration
131
131
// TimeTilDormant dictates the duration after which inactive workspaces will
132
132
// go dormant.
133
- TimeTilDormant time.Duration `json:"time_til_dormant"`
133
+ TimeTilDormant time.Duration
134
134
// TimeTilDormantAutoDelete dictates the duration after which dormant workspaces will be
135
135
// permanently deleted.
136
- TimeTilDormantAutoDelete time.Duration `json:"time_til_dormant_autodelete"`
136
+ TimeTilDormantAutoDelete time.Duration
137
137
// UpdateWorkspaceLastUsedAt updates the template's workspaces'
138
138
// last_used_at field. This is useful for preventing updates to the
139
139
// templates inactivity_ttl immediately triggering a dormant action against
140
140
// workspaces whose last_used_at field violates the new template
141
141
// inactivity_ttl threshold.
142
- UpdateWorkspaceLastUsedAt bool `json:"update_workspace_last_used_at"`
142
+ UpdateWorkspaceLastUsedAt func ( ctx context. Context , db database. Store , templateID uuid. UUID , lastUsedAt time. Time ) error `json:"update_workspace_last_used_at"`
143
143
// UpdateWorkspaceDormantAt updates the template's workspaces'
144
144
// dormant_at field. This is useful for preventing updates to the
145
145
// templates locked_ttl immediately triggering a delete action against
146
146
// workspaces whose dormant_at field violates the new template time_til_dormant_autodelete
147
147
// threshold.
148
- UpdateWorkspaceDormantAt bool `json:"update_workspace_dormant_at"`
148
+ UpdateWorkspaceDormantAt bool
149
149
}
150
150
151
151
// TemplateScheduleStore provides an interface for retrieving template
0 commit comments