Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit137dc6e

Browse files
fix: remove update to workspace TTL on template TTL change for AGPL (#15943)
1 parent9e9a5fd commit137dc6e

File tree

2 files changed

+0
-168
lines changed

2 files changed

+0
-168
lines changed

‎coderd/schedule/template.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package schedule
22

33
import (
44
"context"
5-
"database/sql"
65
"time"
76

87
"github.com/google/uuid"
@@ -229,23 +228,6 @@ func (*agplTemplateScheduleStore) Set(ctx context.Context, db database.Store, tp
229228
returnxerrors.Errorf("update template schedule: %w",err)
230229
}
231230

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-
iftpl.DefaultTTL!=int64(opts.DefaultTTL) {
236-
varttl sql.NullInt64
237-
ifopts.DefaultTTL!=0 {
238-
ttl= sql.NullInt64{Valid:true,Int64:int64(opts.DefaultTTL)}
239-
}
240-
241-
iferr=db.UpdateWorkspacesTTLByTemplateID(ctx, database.UpdateWorkspacesTTLByTemplateIDParams{
242-
TemplateID:tpl.ID,
243-
Ttl:ttl,
244-
});err!=nil {
245-
returnxerrors.Errorf("update workspace ttl by template id %q: %w",tpl.ID,err)
246-
}
247-
}
248-
249231
template,err=db.GetTemplateByID(ctx,tpl.ID)
250232
iferr!=nil {
251233
returnxerrors.Errorf("fetch updated template: %w",err)

‎coderd/schedule/template_test.go

Lines changed: 0 additions & 150 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp