-
Notifications
You must be signed in to change notification settings - Fork 928
feat: implement scheduling mechanism for prebuilds #18126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
47cb6fc
0f4d521
b957eb6
de920b8
5d31b43
b3130a8
0565fb7
99d76e5
bdfcd9e
ea7766f
1e78317
5d99ef1
158b92e
396d080
12dba6c
3fa98b2
8a063ff
12d3d88
3facaf2
6ce7ff2
178676f
368fb36
44b67ae
df202c2
affee62
909d950
e08f8d2
4da1e64
4d2557c
faf9ec7
821eda7
7617042
6c2350f
cacdb1f
8d2c08e
5600054
2215a9e
69ab8e1
4a29496
8edb051
954bf66
2d945cf
533a2b5
2b7119a
96caa18
83872d6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
-- Drop the prebuild schedules table | ||
DROP TABLE template_version_preset_prebuild_schedules; | ||
|
||
-- Remove scheduling_timezone column from template_version_presets table | ||
ALTER TABLE template_version_presets | ||
DROP COLUMN scheduling_timezone; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
-- Add scheduling_timezone column to template_version_presets table | ||
ALTER TABLE template_version_presets | ||
ADD COLUMN scheduling_timezone TEXT DEFAULT '' NOT NULL; | ||
|
||
-- Add table for prebuild schedules | ||
CREATE TABLE template_version_preset_prebuild_schedules ( | ||
id UUID PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, | ||
preset_id UUID NOT NULL, | ||
cron_expression TEXT NOT NULL, | ||
desired_instances INTEGER NOT NULL, | ||
FOREIGN KEY (preset_id) REFERENCES template_version_presets (id) ON DELETE CASCADE | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
INSERT INTO | ||
template_version_preset_prebuild_schedules ( | ||
id, | ||
preset_id, | ||
cron_expression, | ||
desired_instances | ||
) | ||
VALUES ( | ||
'e387cac1-9bf1-4fb6-8a34-db8cfb750dd0', | ||
'28b42cc0-c4fe-4907-a0fe-e4d20f1e9bfe', | ||
'* 8-18 * * 1-5', | ||
1 | ||
); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.