refactor(warehouse): fixed ppoo check to match the new changes

This commit is contained in:
2026-06-10 16:27:52 -05:00
parent 7c4c5f980a
commit 2e460c7f8a

View File

@@ -1,5 +1,5 @@
import { emitToRoom } from "../socket.io/roomEmitter.socket.js";
import { hasRoomMembers } from "../socket.io/roomService.socket.js";
import { hasRoomMembers } from "../socket.io/socket.manager.js";
import { runProdApi } from "../utils/prodEndpoint.utils.js";
export const ppoRun = async () => {
@@ -17,11 +17,13 @@ export const ppoRun = async () => {
};
export const ppooMonitoring = async () => {
if (!hasRoomMembers(`ppoo`)) {
const roomId = "inventory:ppoo";
if (!hasRoomMembers(roomId)) {
return;
}
emitToRoom("ppoo", {
emitToRoom(roomId, {
type: "snapshot",
items: await ppoRun(),
createdAt: new Date().toISOString(),