web/queue: in-place queue task retrying
Some checks failed
Run tests / check lockfile correctness (push) Has been cancelled
Run tests / web sanity check (push) Has been cancelled
Run tests / api sanity check (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled

no more duplicate tasks
This commit is contained in:
wukko
2025-05-19 22:49:54 +06:00
parent 479a64890e
commit 98cd4dfc0d
4 changed files with 24 additions and 5 deletions

View File

@@ -11,7 +11,13 @@ import { createSavePipeline } from "$lib/task-manager/queue";
import type { CobaltSaveRequestBody } from "$lib/types/api";
export const savingHandler = async ({ url, request }: { url?: string, request?: CobaltSaveRequestBody }) => {
type SavingHandlerArgs = {
url?: string,
request?: CobaltSaveRequestBody,
oldTaskId?: string
}
export const savingHandler = async ({ url, request, oldTaskId }: SavingHandlerArgs) => {
downloadButtonState.set("think");
const error = (errorText: string) => {
@@ -103,7 +109,7 @@ export const savingHandler = async ({ url, request }: { url?: string, request?:
if (response.status === "local-processing") {
downloadButtonState.set("done");
return createSavePipeline(response, selectedRequest);
return createSavePipeline(response, selectedRequest, oldTaskId);
}
if (response.status === "picker") {