Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 3efa8c6

Browse files
Pass transactionId during create and delete operations too
1 parent c95a3ba commit 3efa8c6

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: src/common/helper.js

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const elasticsearch = require('elasticsearch')
88
const _ = require('lodash')
99
const Joi = require('@hapi/joi')
1010
const { Mutex } = require('async-mutex')
11-
const logger = require('./logger')
1211

1312
AWS.config.region = config.ES.AWS_REGION
1413

Diff for: src/services/ProcessorService.js

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ async function processCreate (message, transactionId) {
2828
index: topResources[resource].index,
2929
type: topResources[resource].type,
3030
id: message.payload.id,
31+
transactionId,
3132
body: _.omit(message.payload, ['resource', 'originalTopic']),
3233
refresh: 'wait_for'
3334
})
@@ -186,6 +187,7 @@ async function processDelete (message, transactionId) {
186187
index: topResources[resource].index,
187188
type: topResources[resource].type,
188189
id: message.payload.id,
190+
transactionId,
189191
refresh: 'wait_for'
190192
})
191193
} else if (_.includes(_.keys(userResources), resource)) {

0 commit comments

Comments
 (0)