mirror of
https://github.com/wukko/cobalt.git
synced 2025-02-13 06:06:27 +01:00
web/ProcessingQueue: clear old files from storage on page load
This commit is contained in:
parent
0ce777cbfc
commit
7a042e3bfa
1 changed files with 7 additions and 1 deletions
|
@ -1,8 +1,9 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { t } from "$lib/i18n/translations";
|
import { t } from "$lib/i18n/translations";
|
||||||
import { onNavigate } from "$app/navigation";
|
import { onNavigate } from "$app/navigation";
|
||||||
import type { SvelteComponent } from "svelte";
|
import { onMount, type SvelteComponent } from "svelte";
|
||||||
|
|
||||||
|
import { clearFileStorage } from "$lib/storage";
|
||||||
import { currentTasks } from "$lib/state/queen-bee/current-tasks";
|
import { currentTasks } from "$lib/state/queen-bee/current-tasks";
|
||||||
import { clearQueue, queue as readableQueue } from "$lib/state/queen-bee/queue";
|
import { clearQueue, queue as readableQueue } from "$lib/state/queen-bee/queue";
|
||||||
|
|
||||||
|
@ -45,6 +46,11 @@
|
||||||
onNavigate(() => {
|
onNavigate(() => {
|
||||||
expanded = false;
|
expanded = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
|
// clear old files from storage on first page load
|
||||||
|
clearFileStorage();
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="processing-queue" class:expanded>
|
<div id="processing-queue" class:expanded>
|
||||||
|
|
Loading…
Reference in a new issue