refactor(warehouse): fixed ppoo check to match the new changes
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user