web/queen-bee: a bunch of small cleanups

This commit is contained in:
jj 2025-03-29 14:00:26 +00:00
parent 235f6c0a3e
commit d78ae8124f
No known key found for this signature in database
4 changed files with 5 additions and 12 deletions

View File

@ -36,7 +36,7 @@ export const startWorker = async ({ worker, workerId, parentId, workerArgs }: Co
files, files,
workerArgs.ffargs, workerArgs.ffargs,
workerArgs.output, workerArgs.output,
true, // resetStartCounter /*resetStartCounter=*/true,
); );
} }
break; break;

View File

@ -16,7 +16,7 @@ export const runRemuxWorker = async (
files: CobaltFileReference[], files: CobaltFileReference[],
args: string[], args: string[],
output: FileInfo, output: FileInfo,
resetStartCounter?: boolean resetStartCounter = false
) => { ) => {
const worker = new RemuxWorker(); const worker = new RemuxWorker();

View File

@ -5,7 +5,7 @@ import type { CobaltCurrentTasks, CobaltCurrentTaskItem } from "$lib/types/queen
let update: (_: Updater<CobaltCurrentTasks>) => void; let update: (_: Updater<CobaltCurrentTasks>) => void;
const currentTasks = readable<CobaltCurrentTasks>( export const currentTasks = readable<CobaltCurrentTasks>(
{}, {},
(_, _update) => { update = _update } (_, _update) => { update = _update }
); );
@ -36,5 +36,3 @@ export function clearCurrentTasks() {
return {}; return {};
}); });
} }
export { currentTasks };

View File

@ -23,7 +23,7 @@ const clearPipelineCache = (queueItem: CobaltQueueItem) => {
let update: (_: Updater<CobaltQueue>) => void; let update: (_: Updater<CobaltQueue>) => void;
const queue = readable<CobaltQueue>( export const queue = readable<CobaltQueue>(
{}, {},
(_, _update) => { update = _update } (_, _update) => { update = _update }
); );
@ -117,12 +117,7 @@ export function removeItem(id: string) {
} }
export function clearQueue() { export function clearQueue() {
update(() => { update(() => ({}));
return {};
});
clearCurrentTasks(); clearCurrentTasks();
clearFileStorage(); clearFileStorage();
} }
export { queue };