This commit is contained in:
parent
3643f22f0f
commit
3b302dfd20
|
@ -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",
|
||||||
|
|
|
@ -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]);
|
||||||
|
|
Loading…
Reference in New Issue