refactor(dockscanning): more work on the dock door scanning
All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 1m47s

ref #12
This commit is contained in:
2026-06-08 07:49:41 -05:00
parent 6dd1a5b332
commit 7671172d97
18 changed files with 6040 additions and 37 deletions

View File

@@ -1,7 +1,8 @@
import { desc } from "drizzle-orm";
import { desc, eq } from "drizzle-orm";
import { db } from "../db/db.controller.js";
import { logs } from "../db/schema/logs.schema.js";
import { ppoRun } from "../warehousing/warehousing.ppooMonitor.js";
import { dockDoorScans } from "../db/schema/dockdoor.scans.schema.js";
type RoomDefinition<T = unknown> = {
seed: (limit: number) => Promise<T[]>;
@@ -103,7 +104,18 @@ export const roomDefinition: Record<RoomId, RoomDefinition> = {
"dockDoorLoading:2": {
seed: async (limit) => {
console.log(limit);
return [];
try {
const rows = await db
.select()
.from(dockDoorScans).where(eq(dockDoorScans.status, "active"))
.orderBy(desc(dockDoorScans.upd_date))
.limit(limit);
return rows; //.reverse();
} catch (e) {
console.error("Failed to seed logs:", e);
return [];
}
},
},
};