From 4a57bc5f04b884293a34832f3dafd0a197357450 Mon Sep 17 00:00:00 2001 From: "pattishin@google.com" Date: Fri, 5 Apr 2024 08:46:04 -0700 Subject: [PATCH] update publishMessage to queue essages --- other/train-to-cloud-city/devices/rfid/trainGame.js | 1 - .../devices/rfid/utils/firestoreHelpers.js | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/other/train-to-cloud-city/devices/rfid/trainGame.js b/other/train-to-cloud-city/devices/rfid/trainGame.js index 68de936..3ea5fcc 100644 --- a/other/train-to-cloud-city/devices/rfid/trainGame.js +++ b/other/train-to-cloud-city/devices/rfid/trainGame.js @@ -14,7 +14,6 @@ const { StringDecoder } = require("node:string_decoder"); const { - publishMessage, getTrain, getTrainMailbox, getSessionMailbox, diff --git a/other/train-to-cloud-city/devices/rfid/utils/firestoreHelpers.js b/other/train-to-cloud-city/devices/rfid/utils/firestoreHelpers.js index a0fb946..0c7193c 100644 --- a/other/train-to-cloud-city/devices/rfid/utils/firestoreHelpers.js +++ b/other/train-to-cloud-city/devices/rfid/utils/firestoreHelpers.js @@ -205,11 +205,10 @@ async function submitActualCargo(chunks) { const ref = db.collection("global").doc("cargo"); try { await ref.update({ actual_cargo: cargos }, { merge: true }); - /*await publishMessage("cargo-read", { + queueMessageToPublish("cargo-read", { actualCargo: cargos, timestamp: Date.now(), - });*/ - + }); console.log(`Cargos read ${JSON.stringify(cargos)}`); } catch (error) { console.error(error);