File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 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.
6
7
-- The deadline will never decrease.
7
8
-- name: ActivityBumpWorkspace :exec
8
9
WITH latest AS (
@@ -69,7 +70,7 @@ FROM latest l
69
70
WHERE wb .id = l .build_id
70
71
AND l .job_completed_at IS NOT NULL
71
72
-- We only bump if the template has an activity bump duration set.
72
- AND l .activity_bump != 0
73
+ AND l .activity_bump > 0
73
74
AND l .build_transition = ' start'
74
75
-- We only bump if the raw interval is positive and non-zero.
75
76
AND l .ttl_interval > ' 0 seconds' ::interval
You can’t perform that action at this time.
0 commit comments