Update song queue flow #142

Merged
kdeng00 merged 9 commits from song_queue_status_update into v0.2 2025-06-07 14:47:43 -04:00
2 changed files with 4 additions and 3 deletions
Showing only changes of commit 2b5b04aa3d - Show all commits
+1 -1
View File
@@ -5,7 +5,7 @@ CREATE EXTENSION IF NOT EXISTS pgcrypto;
CREATE TABLE IF NOT EXISTS "songQueue" (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
filename TEXT NOT NULL,
status TEXT CHECK (status IN ('pending', 'processing', 'done')),
status TEXT CHECK (status IN ('pending', 'ready', 'processing', 'done')),
data BYTEA NULL
);
+3 -2
View File
@@ -148,11 +148,12 @@ pub mod response {
pub mod status {
pub const PENDING: &str = "pending";
pub const READY: &str = "ready";
pub const PROCESSING: &str = "processing";
pub const DONE: &str = "done";
pub async fn is_valid(status: &str) -> bool {
status == PENDING || status == PROCESSING || status == DONE
status == PENDING || status == PROCESSING || status == DONE || status == READY
}
}
@@ -396,7 +397,7 @@ mod song_queue {
"#,
)
.bind(super::status::PROCESSING)
.bind(super::status::PENDING)
.bind(super::status::READY)
.fetch_one(pool)
.await
.map_err(|e| {