feat(silo): added in charts and historical data
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user