web: parallel queue item processing
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
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

This commit is contained in:
jj
2025-05-16 16:42:40 +00:00
parent 426c073d5f
commit 398681857b
8 changed files with 112 additions and 94 deletions

View File

@@ -86,13 +86,12 @@ export function pipelineTaskDone(id: string, workerId: string, file: File) {
schedule();
}
export function itemRunning(id: string, workerId: string) {
export function itemRunning(id: string) {
update(queueData => {
const data = queueData[id] as CobaltQueueItemRunning;
if (data) {
data.state = 'running';
data.runningWorker = workerId;
data.completedWorkers ??= new Set();
data.pipelineResults ??= [];
}