Let failed studio jobs retry instead of sitting in the queue with only Remove.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-09-02 08:19:21 -05:00
co-authored by Cursor
parent bdec8872b6
commit 1314e8e89f
4 changed files with 88 additions and 4 deletions
+18
View File
@@ -1167,6 +1167,14 @@
>
{{ job.cutIn ? 'Next' : (canCutInStudioJob ? 'Run next' : 'Start now') }}
</button>
<button
v-if="job.status === 'error' || (job.status === 'held' && !job.holdForCutIn)"
type="button"
class="shrink-0 rounded-full border border-amber-300/40 px-2.5 py-1 text-xs text-amber-100 hover:border-amber-200 hover:text-white"
@click="retryStudioJob(job.id)"
>
Retry
</button>
<button
v-if="job.status === 'waiting' || job.status === 'held' || job.status === 'running' || job.status === 'error'"
type="button"
@@ -5085,6 +5093,16 @@ async function cutInStudioJob(id: string) {
}
}
async function retryStudioJob(id: string) {
try {
await $fetch(`/api/studio-queue/${id}/retry`, { method: 'POST' })
toast('Queued to run as soon as the GPU is free.')
await refreshStudioQueue()
} catch (error: any) {
toast(error?.data?.statusMessage || error?.statusMessage || 'Could not retry that job')
}
}
async function dismissStudioJob(id: string) {
try {
await $fetch(`/api/studio-queue/${id}`, { method: 'DELETE' })