Add user slug to transcription jobs
The `TranscribeJob` struct now includes a `user_slug` field. This is necessary for the transcription worker to look up per-user settings such as hotwords and initial prompts. The `collect_pending` function has been updated to return user slugs along with audio paths, and the recovery scan now enqueues jobs with the correct user slug.
This commit is contained in:
@@ -86,7 +86,10 @@ pub async fn handle_upload(
|
||||
|
||||
// Enqueue transcription. Failure here is non-fatal: on restart the recovery
|
||||
// scan will re-enqueue any .m4a without a .transcript.txt sibling.
|
||||
match transcribe_tx.try_send(TranscribeJob { audio_path: file_path.clone() }) {
|
||||
match transcribe_tx.try_send(TranscribeJob {
|
||||
audio_path: file_path.clone(),
|
||||
user_slug: user.slug.clone(),
|
||||
}) {
|
||||
Ok(()) => {}
|
||||
Err(TrySendError::Full(_)) => {
|
||||
warn!(file = %file_path.display(), "Transcription queue full; will be picked up on restart");
|
||||
|
||||
Reference in New Issue
Block a user