feat: lastCounter
gitea/vn-rfid/pipeline/head This commit looks good
Details
gitea/vn-rfid/pipeline/head This commit looks good
Details
This commit is contained in:
parent
17b8ee9194
commit
345bc47df1
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue