- Notifications
You must be signed in to change notification settings - Fork928
Closed
Description
Cleanup: remove column
workspace_auto_off
from tableorganizations
Add columns to table
workspace
autostart_enabled:bool default false
autostop_enabled:bool default false
autostart_at:timestamp with time zone default '0001-01-01- 00:00:00+00::timestamptz
NOTE: this will include the user’s timezoneautostop_at:timestamp with time zone default '0001-01-01- 00:00:00+00::timestamptz
NOTE: this will include the user’s timezone
Add methods to
querier.go
:SetWorkspaceAutoStartEnabled(ctx context.Context, workspaceid string, when time.Time) error
SetWorkspaceAutoStartDisabled(ctx context.Context, workspaceid string) error
SetWorkspaceAutoStopEnabled(ctx context.Context, workspaceid string, when time.Time) error
SetWorkspaceAutoStopDisabled(ctx context.Context, workspaceid string) error
Changes:
- Instead of a
time.Time
, will use a crontab-style representation for schedules. Seecreate cron-style library or wrapper for workspace autostart / autostop #817. autostart_at
andautostop_at
will be renamedautostart_schedule
andautostop_schedule
respectively.autostart_schedule
andautostop_schedule
will allow NULL values, allowingautostart_enabled
andautostop_enabled
to be removed.- We only need the
UpdateWorkspaceAutostart
andUpdateWorkspaceAutostop
methods, passingnil
as the schedule can be semantically equivalent toDisableWorkspaceAuto{Stop,Start}
.
- Instead of a