Skip to content

Commit cc5222d

Browse files
Merge pull request #324 from topcoder-platform/feature/topic-bus-key
Feature/topic bus key
2 parents 425e62f + a1cf99f commit cc5222d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/common/helper.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,7 @@ async function postEvent (topic, payload, options = {}) {
952952
'mime-type': 'application/json',
953953
payload
954954
}
955+
_.merge(message,options)
955956
await client.postEvent(message)
956957
await eventDispatcher.handleEvent(topic, { value: payload, options })
957958
}

src/services/WorkPeriodService.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ async function createWorkPeriod (currentUser, workPeriod) {
235235
}
236236
}
237237

238-
await helper.postEvent(config.TAAS_WORK_PERIOD_CREATE_TOPIC, created.toJSON())
238+
await helper.postEvent(config.TAAS_WORK_PERIOD_CREATE_TOPIC, created.toJSON(),{"key":workPeriod.resourceBookingId})
239239
return created.dataValues
240240
}
241241

@@ -289,7 +289,8 @@ async function updateWorkPeriod (currentUser, id, data) {
289289
}
290290
}
291291

292-
await helper.postEvent(config.TAAS_WORK_PERIOD_UPDATE_TOPIC, updated.toJSON(), { oldValue: oldValue })
292+
//await helper.postEvent(config.TAAS_WORK_PERIOD_UPDATE_TOPIC, updated.toJSON(), { oldValue: oldValue })
293+
await helper.postEvent(config.TAAS_WORK_PERIOD_UPDATE_TOPIC, updated.toJSON(), {"key":data.resourceBookingId})
293294
return updated.dataValues
294295
}
295296

0 commit comments

Comments
 (0)