feat(db cleanup): added a cleanup for labels this checks daily

This commit is contained in:
2025-04-14 12:53:05 -05:00
parent d4edeb15d9
commit 450e5acd34
3 changed files with 31 additions and 20 deletions

View File

@@ -20,6 +20,7 @@ import startPrinterCycle from "./routes/printers/startCycle.js";
import { printerCycleAutoLabelers } from "./controller/printers/printerCycleAutoLabelers.js";
import AutostartPrinterCycle from "./routes/printers/autoLabelerStart.js";
import AutostopPrinterCycle from "./routes/printers/autoLabelerStop.js";
import { deleteLabels } from "../../globalUtils/dbCleanUp/labelCleanUp.js";
const app = new OpenAPIHono();
@@ -85,4 +86,9 @@ setTimeout(async () => {
}
}, 10 * 1000);
// labelcleanup
deleteLabels();
setInterval(() => {
deleteLabels();
}, 60 * 60 * 24 * 1000);
export default app;