diff --git a/src/counter.js b/src/counter.js index 05c5aaa..aacc15c 100644 --- a/src/counter.js +++ b/src/counter.js @@ -1,10 +1,14 @@ import con from '../db/connect.js'; +let lastCounter; export default async(size, arcId) => { + if (lastCounter == size) return; console.logger.info(`COUNTER: SIZE:${size} ARC_ID:${arcId}`); await con.query(` UPDATE vn.arcRead SET counter = ? WHERE id = ?; `, [size, arcId]); + + lastCounter = size; };