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
+13 -8
View File
@@ -17,21 +17,23 @@ class RecordingController extends Controller
*/
public function index(Request $request): View
{
Recording::query()
->whereIn('transcription_status', ['pending', 'processing'])
->orderBy('id')
->each(fn (Recording $recording) => $recording->recoverOrphanedTranscription());
$query = Recording::query()->latest();
if ($search = $request->string('q')->trim()->toString()) {
$query->where(function ($builder) use ($search) {
$builder->where('title', 'like', "%{$search}%")
->orWhere('artist', 'like', "%{$search}%")
->orWhere('album', 'like', "%{$search}%")
->orWhere('original_filename', 'like', "%{$search}%")
->orWhere('transcript', 'like', "%{$search}%");
});
$query->search($search);
}
$recordings = $query->paginate(20)->withQueryString();
return view('recordings.index', compact('recordings', 'search'));
return view('recordings.index', [
'recordings' => $recordings,
'search' => $search ?? '',
]);
}
/**
@@ -77,6 +79,9 @@ class RecordingController extends Controller
*/
public function show(Recording $recording): View
{
$recording->recoverOrphanedTranscription();
$recording->refresh();
return view('recordings.show', compact('recording'));
}