Skip to content

Commit 21f9838

Browse files
committed
Fix comment in activitybump.sql
1 parent 6163df5 commit 21f9838

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

coderd/database/queries/activitybump.sql

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
-- Bumps the workspace deadline by 1 hour. If the workspace bump will
2-
-- cross an autostart threshold, then the bump is autostart + TTL. This
3-
-- is the deadline behavior if the workspace was to autostart from a stopped
4-
-- state.
5-
-- Max deadline is respected, and will never be bumped.
1+
-- Bumps the workspace deadline by the template's configured "activity_bump"
2+
-- duration (default 1h). If the workspace bump will cross an autostart
3+
-- threshold, then the bump is autostart + TTL. This is the deadline behavior if
4+
-- the workspace was to autostart from a stopped state.
5+
--
6+
-- Max deadline is respected, and the deadline will never be bumped past it.
67
-- The deadline will never decrease.
78
-- name: ActivityBumpWorkspace :exec
89
WITH latest AS (
@@ -69,7 +70,7 @@ FROM latest l
6970
WHERE wb.id = l.build_id
7071
AND l.job_completed_at IS NOT NULL
7172
-- We only bump if the template has an activity bump duration set.
72-
AND l.activity_bump != 0
73+
AND l.activity_bump > 0
7374
AND l.build_transition = 'start'
7475
-- We only bump if the raw interval is positive and non-zero.
7576
AND l.ttl_interval > '0 seconds'::interval

0 commit comments

Comments
 (0)