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:
2026-04-14 11:02:37 +02:00
parent 0ef9109876
commit fc8efc62e0
3 changed files with 23 additions and 7 deletions
+4 -1
View File
@@ -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");