Skip to content

Commit 1270c88

Browse files
committed
Moved send invitation to kafka event processer
1 parent 972e118 commit 1270c88

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/eventHandlers/InterviewEventHandler.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ async function checkOverlapping (payload) {
193193
* @returns {undefined}
194194
*/
195195
async function processRequest (payload) {
196+
await sendInterviewInvitationNotifications(payload.value)
196197
await checkOverlapping(payload)
197198
}
198199

@@ -208,6 +209,5 @@ async function processUpdate (payload) {
208209

209210
module.exports = {
210211
processRequest,
211-
processUpdate,
212-
sendInterviewInvitationNotifications
212+
processUpdate
213213
}

src/services/InterviewService.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ const {
3232
patchSchedulingPage
3333
} = require('./NylasService')
3434
const { createUserMeetingSettingsIfNotExisting } = require('./UserMeetingSettingsService')
35-
const interviewEventHandler = require('../eventHandlers/InterviewEventHandler')
3635
/**
3736
* Ensures user is permitted for the operation.
3837
*
@@ -325,7 +324,6 @@ async function requestInterview (currentUser, jobCandidateId, interview) {
325324
// if reaches here, it's not one of the common errors handled in `handleSequelizeError`
326325
throw err
327326
}
328-
await interviewEventHandler.sendInterviewInvitationNotifications(interview)
329327
await helper.postEvent(config.TAAS_INTERVIEW_REQUEST_TOPIC, entity)
330328
await helper.postEvent(config.TAAS_JOB_CANDIDATE_UPDATE_TOPIC, jobCandidateEntity)
331329
// return created interview

0 commit comments

Comments
 (0)