Fix stuck transcriptions and make transcripts stoppable and searchable.

Raise queue retry_after above the job timeout, recover orphaned runs, allow stop/restart with any engine, and keep finished transcripts searchable in the recordings list.
This commit is contained in:
ben
2026-08-12 15:10:33 +02:00
parent eb0f019025
commit bc6cb5efa4
14 changed files with 626 additions and 64 deletions
@@ -11,11 +11,14 @@ class TranscribeController extends Controller
{
/**
* Queue transcription for the recording with the chosen engine.
*
* Always allowed: stops any current run first, then starts the new engine.
*/
public function __invoke(TranscribeRecordingRequest $request, Recording $recording): RedirectResponse
{
if ($recording->transcription_status === 'processing') {
return back()->with('error', 'Transcription is already in progress.');
if ($recording->isTranscribing() || $recording->hasActiveTranscriptionJob()) {
$recording->cancelTranscription(silent: true);
$recording->refresh();
}
$driver = $request->validated('driver');
@@ -28,8 +31,8 @@ class TranscribeController extends Controller
'transcription_percent' => 5,
'transcription_started_at' => now(),
'transcription_error' => null,
'transcript' => null,
'transcribed_at' => null,
// Keep the previous transcript until a new run succeeds.
'transcribed_at' => $recording->transcribed_at,
]);
TranscribeRecording::dispatch($recording->fresh());