Skip to content

feat: add customizable ttl_bump interval #10566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix activity bump sql
  • Loading branch information
Emyrk committed Nov 13, 2023
commit 4fb280cc29cdbdf499f6beea2a3f8b5f2b7d4f90
2 changes: 1 addition & 1 deletion coderd/database/queries.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion coderd/database/queries/activitybump.sql
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ WITH latest AS (
END
ELSE
CASE
WHEN templates.ttl_bump > 0 THEN (templates.ttl_bump / 1000 / 1000 / 1000 || ' seconds')::interval
WHEN templates.default_ttl_bump > 0 THEN (templates.default_ttl_bump / 1000 / 1000 / 1000 || ' seconds')::interval
ELSE (templates.default_ttl / 1000 / 1000 / 1000 || ' seconds')::interval
END
END
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ describe("WorkspaceSchedulePage", () => {
// zero
[0, 0, { autostopEnabled: false, ttl: 0, ttl_bump: 0 }],
// basic case
[28_800_000, 3600, { autostopEnabled: true, ttl: 8, ttl_bump: 1 }],
[28_800_000, 3600, { autostopEnabled: true, ttl: 8, ttl_bump: 0 }],
] as const)(
`ttlMsToAutostop(%p) returns %p`,
(ttlMs, ttlBumpMs, autostop) => {
Expand Down