mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: notify users before workspace autostop (#26676)
This commit is contained in:
@@ -141,6 +141,19 @@ SET
|
||||
updated_at = @updated_at::timestamptz
|
||||
WHERE id = @id::uuid;
|
||||
|
||||
-- name: UpdateWorkspaceBuildNotifiedAutostopDeadline :exec
|
||||
-- Stamps the deadline value that an autostop reminder was last sent for. Once
|
||||
-- this equals the build's deadline the reminder is considered handled and the
|
||||
-- lifecycle executor will not send another for this deadline, which makes the
|
||||
-- reminder idempotent and HA-safe. It re-arms automatically when the deadline
|
||||
-- changes (e.g. an activity bump).
|
||||
UPDATE
|
||||
workspace_builds
|
||||
SET
|
||||
notified_autostop_deadline = @notified_autostop_deadline::timestamptz,
|
||||
updated_at = @updated_at::timestamptz
|
||||
WHERE id = @id::uuid;
|
||||
|
||||
-- name: GetActiveWorkspaceBuildsByTemplateID :many
|
||||
SELECT wb.*
|
||||
FROM (
|
||||
|
||||
Reference in New Issue
Block a user