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';
|
import con from '../db/connect.js';
|
||||||
|
let lastCounter;
|
||||||
|
|
||||||
export default async(size, arcId) => {
|
export default async(size, arcId) => {
|
||||||
|
if (lastCounter == size) return;
|
||||||
console.logger.info(`COUNTER: SIZE:${size} ARC_ID:${arcId}`);
|
console.logger.info(`COUNTER: SIZE:${size} ARC_ID:${arcId}`);
|
||||||
await con.query(`
|
await con.query(`
|
||||||
UPDATE vn.arcRead
|
UPDATE vn.arcRead
|
||||||
SET counter = ?
|
SET counter = ?
|
||||||
WHERE id = ?;
|
WHERE id = ?;
|
||||||
`, [size, arcId]);
|
`, [size, arcId]);
|
||||||
|
|
||||||
|
lastCounter = size;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue