Skip to content

New action topic #306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,11 @@
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
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
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
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
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
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
tc-taas-es-processor | [2021-04-09T21:20:21.475Z] app INFO : Initialized.......
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
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
tc-taas-es-processor | [2021-04-09T21:20:21.480Z] app INFO : Kick Start.......
tc-taas-es-processor | ********** Topcoder Health Check DropIn listening on port 3001
tc-taas-es-processor | Topcoder Health Check DropIn started and ready to roll
Expand Down
2 changes: 2 additions & 0 deletions config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ module.exports = {
TAAS_ROLE_UPDATE_TOPIC: process.env.TAAS_ROLE_UPDATE_TOPIC || 'taas.role.update',
// the delete role entity Kafka message topic
TAAS_ROLE_DELETE_TOPIC: process.env.TAAS_ROLE_DELETE_TOPIC || 'taas.role.delete',
// special kafka topics
TAAS_ACTION_RETRY_TOPIC: process.env.TAAS_ACTION_RETRY_TOPIC || 'taas.action.retry',

// the Kafka message topic for sending email
EMAIL_TOPIC: process.env.EMAIL_TOPIC || 'external.action.email',
Expand Down
1 change: 1 addition & 0 deletions local/kafka-client/topics.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ taas.interview.requested
taas.interview.update
taas.interview.bulkUpdate
external.action.email
taas.action.retry
4 changes: 2 additions & 2 deletions test/unit/ResourceBookingService.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ describe('resourceBooking service test', () => {
expect(esClientSearch.calledOnce).to.be.true
expect(result).to.deep.eq(data.result)
})
it('T25:Search resource bookin from DB', async () => {
it('T25:Search resource booking from DB', async () => {
const data = testData.T25
const ESClient = commonData.ESClient
ESClient.search = () => {}
Expand All @@ -456,7 +456,7 @@ describe('resourceBooking service test', () => {
return data.resourceBookingFindAll
})
const stubResourceBookingCount = sinon.stub(ResourceBooking, 'count').callsFake(async () => {
return data.resourceBookingFindAll.length
return data.resourceBookingCount
})
const result = await service.searchResourceBookings(commonData.userWithManagePermission, data.criteria)
expect(esClientSearch.calledOnce).to.be.true
Expand Down
2 changes: 2 additions & 0 deletions test/unit/common/ResourceBookingData.js
Original file line number Diff line number Diff line change
Expand Up @@ -1229,6 +1229,8 @@ const T25 = {
updatedAt: '2021-05-08T18:47:37.268Z'
}
],
resourceBookingCount: [{ id: 'fbe133dd-0e36-4d0c-8197-49307b13ce75', count: 1 },
{ id: '60e99790-8da0-4596-badc-29a06feb78a0', count: 1 }],
criteria: {},
result: {
fromDb: true,
Expand Down