From 842c141e13cf60fc2acd6d24ce1ba0fb33a005d5 Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 25 Jul 2024 10:38:52 +0200 Subject: [PATCH] feat: set to 0 counter when createPallet or not --- src/newPallet.js | 2 -- src/stream.js | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/newPallet.js b/src/newPallet.js index 27a5b48..15cf929 100644 --- a/src/newPallet.js +++ b/src/newPallet.js @@ -1,12 +1,10 @@ import con from '../db/connect.js'; -import counter from './counter.js'; import t from '../util/translator.js'; export default async(rfids, arcId) => { try { console.log(Array.from(rfids), arcId, null); await con.query(`CALL vn.expeditionPallet_build(JSON_ARRAY(?), ?, ?, @palletId);`, [Array.from(rfids), arcId, null]); - await counter(null, arcId); } catch (error) { console.log(error); await con.query(`UPDATE vn.arcRead SET error = ?, counter = NULL WHERE id = ?;`, [t(error.sqlMessage), arcId]); diff --git a/src/stream.js b/src/stream.js index 71eab03..f13c55a 100644 --- a/src/stream.js +++ b/src/stream.js @@ -44,6 +44,7 @@ export default async(conf, cb) => { rfidbuffer = new Set(); rfidbufferExtend = []; + counterIntervalManager(); } function counterIntervalManager() {