Skip to content

Commit 7894bb5

Browse files
authored
Merge pull request #306 from eisbilir/new-action-topic
New action topic
2 parents 440234d + 81772c0 commit 7894bb5

File tree

5 files changed

+9
-3
lines changed

5 files changed

+9
-3
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,11 @@
103103
tc-taas-es-processor | 2021-04-09T21:20:21.469Z DEBUG no-kafka-client Subscribed to taas.workperiodpayment.update:0 offset 0 leader kafka:9093
104104
tc-taas-es-processor | 2021-04-09T21:20:21.470Z DEBUG no-kafka-client Subscribed to taas.workperiodpayment.delete:0 offset 0 leader kafka:9093
105105
tc-taas-es-processor | 2021-04-09T21:20:21.471Z DEBUG no-kafka-client Subscribed to taas.workperiodpayment.create:0 offset 0 leader kafka:9093
106+
tc-taas-es-processor | 2021-04-09T21:20:21.472Z DEBUG no-kafka-client Subscribed to taas.action.retry:0 offset 0 leader kafka:9093
106107
tc-taas-es-processor | 2021-04-09T21:20:21.473Z DEBUG no-kafka-client Subscribed to taas.job.update:0 offset 0 leader kafka:9093
107108
tc-taas-es-processor | 2021-04-09T21:20:21.474Z DEBUG no-kafka-client Subscribed to taas.resourcebooking.update:0 offset 0 leader kafka:9093
108109
tc-taas-es-processor | [2021-04-09T21:20:21.475Z] app INFO : Initialized.......
109-
tc-taas-es-processor | [2021-04-09T21:20:21.479Z] app INFO : taas.job.create,taas.job.update,taas.job.delete,taas.jobcandidate.create,taas.jobcandidate.update,taas.jobcandidate.delete,taas.resourcebooking.create,taas.resourcebooking.update,taas.resourcebooking.delete,taas.workperiod.create,taas.workperiod.update,taas.workperiod.delete,taas.workperiodpayment.create,taas.workperiodpayment.update,taas.interview.requested,taas.interview.update,taas.interview.bulkUpdate,taas.role.requested,taas.role.update,taas.role.delete
110+
tc-taas-es-processor | [2021-04-09T21:20:21.479Z] app INFO : common.error.reporting,taas.job.create,taas.job.update,taas.job.delete,taas.jobcandidate.create,taas.jobcandidate.update,taas.jobcandidate.delete,taas.resourcebooking.create,taas.resourcebooking.update,taas.resourcebooking.delete,taas.workperiod.create,taas.workperiod.update,taas.workperiod.delete,taas.workperiodpayment.create,taas.workperiodpayment.update,taas.interview.requested,taas.interview.update,taas.interview.bulkUpdate,taas.role.requested,taas.role.update,taas.role.delete,taas.action.retry
110111
tc-taas-es-processor | [2021-04-09T21:20:21.480Z] app INFO : Kick Start.......
111112
tc-taas-es-processor | ********** Topcoder Health Check DropIn listening on port 3001
112113
tc-taas-es-processor | Topcoder Health Check DropIn started and ready to roll

config/default.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ module.exports = {
140140
TAAS_ROLE_UPDATE_TOPIC: process.env.TAAS_ROLE_UPDATE_TOPIC || 'taas.role.update',
141141
// the delete role entity Kafka message topic
142142
TAAS_ROLE_DELETE_TOPIC: process.env.TAAS_ROLE_DELETE_TOPIC || 'taas.role.delete',
143+
// special kafka topics
144+
TAAS_ACTION_RETRY_TOPIC: process.env.TAAS_ACTION_RETRY_TOPIC || 'taas.action.retry',
143145

144146
// the Kafka message topic for sending email
145147
EMAIL_TOPIC: process.env.EMAIL_TOPIC || 'external.action.email',

local/kafka-client/topics.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ taas.interview.requested
2020
taas.interview.update
2121
taas.interview.bulkUpdate
2222
external.action.email
23+
taas.action.retry

test/unit/ResourceBookingService.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ describe('resourceBooking service test', () => {
447447
expect(esClientSearch.calledOnce).to.be.true
448448
expect(result).to.deep.eq(data.result)
449449
})
450-
it('T25:Search resource bookin from DB', async () => {
450+
it('T25:Search resource booking from DB', async () => {
451451
const data = testData.T25
452452
const ESClient = commonData.ESClient
453453
ESClient.search = () => {}
@@ -456,7 +456,7 @@ describe('resourceBooking service test', () => {
456456
return data.resourceBookingFindAll
457457
})
458458
const stubResourceBookingCount = sinon.stub(ResourceBooking, 'count').callsFake(async () => {
459-
return data.resourceBookingFindAll.length
459+
return data.resourceBookingCount
460460
})
461461
const result = await service.searchResourceBookings(commonData.userWithManagePermission, data.criteria)
462462
expect(esClientSearch.calledOnce).to.be.true

test/unit/common/ResourceBookingData.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,6 +1229,8 @@ const T25 = {
12291229
updatedAt: '2021-05-08T18:47:37.268Z'
12301230
}
12311231
],
1232+
resourceBookingCount: [{ id: 'fbe133dd-0e36-4d0c-8197-49307b13ce75', count: 1 },
1233+
{ id: '60e99790-8da0-4596-badc-29a06feb78a0', count: 1 }],
12321234
criteria: {},
12331235
result: {
12341236
fromDb: true,

0 commit comments

Comments
 (0)