feat(storage): set_meeting_status for background import status transitions
This commit is contained in:
1 parent
a95eafe952
commit
e0e9377273
1 file changed
+14
@@ -276,6 +276,10 @@ pub trait Store: Send + Sync {
|
||||
) -> Result<Vec<MeetingListItem>, StoreError>;
|
||||
async fn get_meeting(&self, id: &MeetingId) -> Result<Meeting, StoreError>;
|
||||
async fn delete_meeting(&self, id: &MeetingId) -> Result<(), StoreError>;
|
||||
/// Overwrite a meeting's lifecycle `status` (e.g. mark a background import
|
||||
/// `transcribing` while it runs, or `error` if it fails). `finalize_meeting`
|
||||
/// is still the only path to `ready`.
|
||||
async fn set_meeting_status(&self, id: &MeetingId, status: &str) -> Result<(), StoreError>;
|
||||
async fn update_notes(&self, id: &MeetingId, markdown: &str) -> Result<(), StoreError>;
|
||||
/// (Re)builds this meeting's FTS index row from the current title and
|
||||
/// whatever's on disk/in the DB for transcript/notes/summary/tags (Phase
|
||||
@@ -976,6 +980,16 @@ impl Store for SqliteStore {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn set_meeting_status(&self, id: &MeetingId, status: &str) -> Result<(), StoreError> {
|
||||
sqlx::query("UPDATE meetings SET status = ?, updated_at = ? WHERE id = ?")
|
||||
.bind(status)
|
||||
.bind(now_unix())
|
||||
.bind(id)
|
||||
.execute(&self.pool)
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn update_notes(&self, id: &MeetingId, markdown: &str) -> Result<(), StoreError> {
|
||||
write_artifact(
|
||||
&paths::meeting_dir(id).join("notes.md"),
|
||||
|
||||
Reference in new issue
Block a user