Skip to content

Commit 9cefc08

Browse files
committed
added debug logs to see when notifications are triggered by scheduler
1 parent 68feb1d commit 9cefc08

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/services/NotificationsSchedulerService.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ async function getDataForInterview (interview, jobCandidate, job) {
109109
* Sends notifications to all the teams which have candidates available for review
110110
*/
111111
async function sendCandidatesAvailableNotifications () {
112+
localLogger.debug('[sendCandidatesAvailableNotifications]: Looking for due records...')
112113
const jobsDao = await Job.findAll({
113114
include: [{
114115
model: JobCandidate,
@@ -190,6 +191,7 @@ async function sendCandidatesAvailableNotifications () {
190191
* Sends reminders to the hosts and guests about their upcoming interview(s)
191192
*/
192193
async function sendInterviewComingUpNotifications () {
194+
localLogger.debug('[sendInterviewComingUpNotifications]: Looking for due records...')
193195
const currentTime = moment.utc()
194196
const timestampFilter = {
195197
[Op.or]: []
@@ -281,6 +283,7 @@ async function sendInterviewComingUpNotifications () {
281283
* Sends reminder to the interview host after it ends to change the interview status
282284
*/
283285
async function sendInterviewCompletedNotifications () {
286+
localLogger.debug('[sendInterviewCompletedNotifications]: Looking for due records...')
284287
const window = moment.duration(config.INTERVIEW_COMPLETED_MATCH_WINDOW)
285288
const rangeStart = moment.utc().subtract(moment.duration(config.INTERVIEW_COMPLETED_PAST_TIME))
286289
const rangeEnd = rangeStart.clone().add(window)
@@ -344,6 +347,7 @@ async function sendInterviewCompletedNotifications () {
344347
* to update the job candidate status
345348
*/
346349
async function sendPostInterviewActionNotifications () {
350+
localLogger.debug('[sendPostInterviewActionNotifications]: Looking for due records...')
347351
const completedJobCandidates = await JobCandidate.findAll({
348352
where: {
349353
status: constants.JobCandidateStatus.INTERVIEW
@@ -436,6 +440,7 @@ async function sendPostInterviewActionNotifications () {
436440
* Sends reminders to all members of teams which have atleast one upcoming resource booking expiration
437441
*/
438442
async function sendResourceBookingExpirationNotifications () {
443+
localLogger.debug('[sendResourceBookingExpirationNotifications]: Looking for due records...')
439444
const currentTime = moment.utc()
440445
const maxEndDate = currentTime.clone().add(moment.duration(config.RESOURCE_BOOKING_EXPIRY_TIME))
441446

0 commit comments

Comments
 (0)