mirror of
https://github.com/imputnet/cobalt.git
synced 2025-12-18 14:08:51 +00:00
web/queen-bee: a bunch of small cleanups
This commit is contained in:
@@ -5,7 +5,7 @@ import type { CobaltCurrentTasks, CobaltCurrentTaskItem } from "$lib/types/queen
|
||||
|
||||
let update: (_: Updater<CobaltCurrentTasks>) => void;
|
||||
|
||||
const currentTasks = readable<CobaltCurrentTasks>(
|
||||
export const currentTasks = readable<CobaltCurrentTasks>(
|
||||
{},
|
||||
(_, _update) => { update = _update }
|
||||
);
|
||||
@@ -36,5 +36,3 @@ export function clearCurrentTasks() {
|
||||
return {};
|
||||
});
|
||||
}
|
||||
|
||||
export { currentTasks };
|
||||
|
||||
@@ -23,7 +23,7 @@ const clearPipelineCache = (queueItem: CobaltQueueItem) => {
|
||||
|
||||
let update: (_: Updater<CobaltQueue>) => void;
|
||||
|
||||
const queue = readable<CobaltQueue>(
|
||||
export const queue = readable<CobaltQueue>(
|
||||
{},
|
||||
(_, _update) => { update = _update }
|
||||
);
|
||||
@@ -117,12 +117,7 @@ export function removeItem(id: string) {
|
||||
}
|
||||
|
||||
export function clearQueue() {
|
||||
update(() => {
|
||||
return {};
|
||||
});
|
||||
|
||||
update(() => ({}));
|
||||
clearCurrentTasks();
|
||||
clearFileStorage();
|
||||
}
|
||||
|
||||
export { queue };
|
||||
|
||||
Reference in New Issue
Block a user