fix(consumer): refs #4409 QueueId code fix
gitea/mycdc/pipeline/head This commit looks good Details

This commit is contained in:
Juan Ferrer 2024-04-09 09:38:27 +02:00
parent 3643f22f0f
commit 3b302dfd20
2 changed files with 2 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "mycdc", "name": "mycdc",
"version": "0.0.6", "version": "0.0.8",
"author": "Verdnatura Levante SL", "author": "Verdnatura Levante SL",
"description": "Asynchronous DB calculations reading the binary log", "description": "Asynchronous DB calculations reading the binary log",
"license": "GPL-3.0", "license": "GPL-3.0",

View File

@ -24,9 +24,8 @@ module.exports = class QueueId extends Queue {
await consumer.db.query(query, myParams); await consumer.db.query(query, myParams);
} }
const keyChanged = data.cols.indexOf(key) !== -1;
if (data.eventName === 'updaterows') { if (data.eventName === 'updaterows') {
const keyChanged = data.cols.indexOf(key) !== -1;
for (const row of data.rows) { for (const row of data.rows) {
if (keyChanged) if (keyChanged)
await dbQuery(row.before[key]); await dbQuery(row.before[key]);