feat(silo): added in charts and historical data

This commit is contained in:
2025-04-09 17:48:03 -05:00
parent efc630f5f8
commit bad390ec17
14 changed files with 495 additions and 92 deletions

View File

@@ -7,6 +7,8 @@ import postComment from "./route/siloAdjustments/postComment.js";
import getStockSilo from "./route/siloAdjustments/getStockData.js";
import { migrateAdjustments } from "./controller/siloAdjustments/migrateAdjustments.js";
import getSiloAdjustments from "./route/siloAdjustments/getSiloAdjustments.js";
import { getLanesToCycleCount } from "./controller/warehouse/cycleCountChecks/cyclecountCheck.js";
import getCycleCountCheck from "./route/getCycleCountChecks.js";
const app = new OpenAPIHono();
@@ -19,6 +21,8 @@ const routes = [
postComment,
getStockSilo,
getSiloAdjustments,
//lanes
getCycleCountCheck,
] as const;
// app.route("/server", modules);
@@ -28,6 +32,17 @@ const appRoutes = routes.forEach((route) => {
setTimeout(() => {
migrateAdjustments();
}, 10 * 1000);
}, 120 * 1000);
/**
* Start the cycle count check
*/
setTimeout(() => {
getLanesToCycleCount();
}, 5 * 1000);
setInterval(async () => {
getLanesToCycleCount();
}, 15 * 60 * 1000);
export default app;