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

Commit dd1b563

Browse files
Pass transaction id in the enrich execution too
1 parent 7e0c04f commit dd1b563

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/services/ProcessorService.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ async function processCreate (message, transactionId) {
3434
refresh: 'wait_for'
3535
})
3636
if (topResources[resource].enrich) {
37-
await client.enrich.executePolicy({ name: topResources[resource].enrich.policyName })
37+
await client.enrich.executePolicy({
38+
name: topResources[resource].enrich.policyName,
39+
transactionId
40+
})
3841
}
3942
} else if (_.includes(_.keys(userResources), resource)) {
4043
// process user resources such as userSkill, userAttribute...
@@ -118,7 +121,10 @@ async function processUpdate (message, transactionId) {
118121
refresh: 'wait_for'
119122
})
120123
if (topResources[resource].enrich) {
121-
await client.enrich.executePolicy({ name: topResources[resource].enrich.policyName })
124+
await client.enrich.executePolicy({
125+
name: topResources[resource].enrich.policyName,
126+
transactionId
127+
})
122128
}
123129
} else if (_.includes(_.keys(userResources), resource)) {
124130
// process user resources such as userSkill, userAttribute...
@@ -195,6 +201,12 @@ async function processDelete (message, transactionId) {
195201
transactionId,
196202
refresh: 'wait_for'
197203
})
204+
if (topResources[resource].enrich) {
205+
await client.enrich.executePolicy({
206+
name: topResources[resource].enrich.policyName,
207+
transactionId
208+
})
209+
}
198210
} else if (_.includes(_.keys(userResources), resource)) {
199211
// process user resources such as userSkill, userAttribute...
200212
const userResource = userResources[resource]

0 commit comments

Comments
 (0)