feat: add template activity_bump property (#11734)

Allows template admins to configure the activity bump duration. Defaults to 1h.
This commit is contained in:
Dean Sheather
2024-02-12 23:00:35 -08:00
committed by GitHub
parent fead57f304
commit e1e352d8c1
34 changed files with 354 additions and 90 deletions

View File

@ -849,7 +849,8 @@ CREATE TABLE templates (
autostart_block_days_of_week smallint DEFAULT 0 NOT NULL,
require_active_version boolean DEFAULT false NOT NULL,
deprecated text DEFAULT ''::text NOT NULL,
use_max_ttl boolean DEFAULT false NOT NULL
use_max_ttl boolean DEFAULT false NOT NULL,
activity_bump bigint DEFAULT '3600000000000'::bigint NOT NULL
);
COMMENT ON COLUMN templates.default_ttl IS 'The default duration for autostop for workspaces created from this template.';
@ -899,6 +900,7 @@ CREATE VIEW template_with_users AS
templates.require_active_version,
templates.deprecated,
templates.use_max_ttl,
templates.activity_bump,
COALESCE(visible_users.avatar_url, ''::text) AS created_by_avatar_url,
COALESCE(visible_users.username, ''::text) AS created_by_username
FROM (public.templates