add priority level to tts

This commit is contained in:
Brandon Thomas committed 2022-02-09 12:30:39 -05:00
1 parent 29f713c157
commit 67f93b84ac
3 files changed
+18 -3

No files matched your search

@@ -2,8 +2,9 @@
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
ALTER TABLE tts_inference_jobs DROP COLUMN is_from_api;
ALTER TABLE tts_inference_jobs DROP COLUMN is_for_twitch;
ALTER TABLE tts_inference_jobs DROP COLUMN is_from_api;
ALTER TABLE tts_inference_jobs DROP COLUMN priority_level;
ALTER TABLE tts_results DROP COLUMN is_from_api;
ALTER TABLE tts_results DROP COLUMN is_for_twitch;
@@ -5,8 +5,16 @@
ALTER TABLE tts_inference_jobs
ADD COLUMN is_from_api BOOLEAN NOT NULL DEFAULT FALSE
AFTER creator_set_visibility,
ADD COLUMN is_for_twitch BOOLEAN NOT NULL DEFAULT FALSE
AFTER is_from_api;
AFTER is_from_api,
-- Priority *increases*, so a level of 2 will be higher than 1.
-- By default, all jobs from FakeYou have level 0.
-- Twitch TTS has level 1.
-- Paid Twitch and Paid API have level 2.
ADD COLUMN priority_level TINYINT UNSIGNED NOT NULL DEFAULT 0
AFTER status;
ALTER TABLE tts_results
ADD COLUMN is_from_api BOOLEAN NOT NULL DEFAULT FALSE
@@ -84,7 +84,13 @@ CREATE TABLE tts_inference_jobs (
'attempt_failed',
'dead') NOT NULL DEFAULT 'pending',
-- We can track this against a "max_attempt_count"
-- Priority *increases*, so a level of 2 will be higher than 1.
-- By default, all jobs from FakeYou have level 0.
-- Twitch TTS has level 1.
-- Paid Twitch and Paid API have level 2.
priority_level TINYINT UNSIGNED NOT NULL DEFAULT 0,
-- We can track this against a "max_attempt_count"
attempt_count INT(3) NOT NULL DEFAULT 0,
-- If there is a failure, tell the user why.