Skip to content
Merged
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
8 changes: 4 additions & 4 deletions src/services/NotificationsSchedulerService.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ async function sendCandidatesAvailableNotifications () {
*/
async function sendInterviewComingUpNotifications () {
localLogger.debug('[sendInterviewComingUpNotifications]: Looking for due records...')
const currentTime = moment.utc()
const currentTime = moment.utc().startOf('minute')
const timestampFilter = {
[Op.or]: []
}
Expand All @@ -204,10 +204,10 @@ async function sendInterviewComingUpNotifications () {
timestampFilter[Op.or].push({
[Op.and]: [
{
[Op.gt]: rangeStart
[Op.gte]: rangeStart
},
{
[Op.lte]: rangeEnd
[Op.lt]: rangeEnd
}
]
})
Expand Down Expand Up @@ -290,7 +290,7 @@ async function sendInterviewComingUpNotifications () {
async function sendInterviewCompletedNotifications () {
localLogger.debug('[sendInterviewCompletedNotifications]: Looking for due records...')
const window = moment.duration(config.INTERVIEW_COMPLETED_MATCH_WINDOW)
const rangeStart = moment.utc().subtract(moment.duration(config.INTERVIEW_COMPLETED_PAST_TIME))
const rangeStart = moment.utc().startOf('minute').subtract(moment.duration(config.INTERVIEW_COMPLETED_PAST_TIME))
const rangeEnd = rangeStart.clone().add(window)
const filter = {
[Op.and]: [
Expand Down