feat(eom): added in hostorical data and deletion for data over 45 days

This commit is contained in:
2025-08-10 18:11:16 -05:00
parent a8a1c1d7fb
commit 52345bc94c
10 changed files with 4693 additions and 18 deletions

View File

@@ -4,10 +4,19 @@ const app = new OpenAPIHono();
import stats from "./route/stats.js";
import history from "./route/invHistory.js";
import { createJob } from "../notifications/utils/processNotifications.js";
import { historicalInvIMmport } from "./utils/historicalInv.js";
const routes = [stats, history] as const;
const appRoutes = routes.forEach((route) => {
app.route("/eom", route);
});
// setTimeout(() => {
// historicalInvIMmport();
// }, 5 * 1000);
// the time we want to run the hostircal data should be the same time the historical data run on the server
// getting this from the shift time
createJob("eom_historical_inv", "0 7 * * *", historicalInvIMmport);
export default app;