feat(rfid): new check to remove tags that have been at a line longer than 6 hours
This commit is contained in:
@@ -7,6 +7,7 @@ import updateReader from "./route/updateReader.js";
|
||||
import manualTrigger from "./route/manualTagRead.js";
|
||||
import getReaders from "./route/getReaders.js";
|
||||
import resetRatio from "./route/resetRatio.js";
|
||||
import { monitorRfidTags } from "./utils/monitorTags.js";
|
||||
const app = new OpenAPIHono();
|
||||
|
||||
const routes = [
|
||||
@@ -24,4 +25,9 @@ const appRoutes = routes.forEach((route) => {
|
||||
app.route("/rfid", route);
|
||||
});
|
||||
|
||||
// monitor every 5 min tags older than 6 hours to remove the line they were so we reduce the risk of them being labeled with the wrong info
|
||||
setInterval(() => {
|
||||
monitorRfidTags();
|
||||
}, 5 * 1000 * 60);
|
||||
|
||||
export default app;
|
||||
|
||||
Reference in New Issue
Block a user