@@ -2,7 +2,6 @@ package schedule
2
2
3
3
import (
4
4
"context"
5
- "database/sql"
6
5
"time"
7
6
8
7
"github.com/google/uuid"
@@ -229,23 +228,6 @@ func (*agplTemplateScheduleStore) Set(ctx context.Context, db database.Store, tp
229
228
return xerrors .Errorf ("update template schedule: %w" ,err )
230
229
}
231
230
232
- // Users running the AGPL version are unable to customize their workspaces
233
- // autostop, so we want to keep their workspaces in track with any template
234
- // TTL changes.
235
- if tpl .DefaultTTL != int64 (opts .DefaultTTL ) {
236
- var ttl sql.NullInt64
237
- if opts .DefaultTTL != 0 {
238
- ttl = sql.NullInt64 {Valid :true ,Int64 :int64 (opts .DefaultTTL )}
239
- }
240
-
241
- if err = db .UpdateWorkspacesTTLByTemplateID (ctx , database.UpdateWorkspacesTTLByTemplateIDParams {
242
- TemplateID :tpl .ID ,
243
- Ttl :ttl ,
244
- });err != nil {
245
- return xerrors .Errorf ("update workspace ttl by template id %q: %w" ,tpl .ID ,err )
246
- }
247
- }
248
-
249
231
template ,err = db .GetTemplateByID (ctx ,tpl .ID )
250
232
if err != nil {
251
233
return xerrors .Errorf ("fetch updated template: %w" ,err )