@@ -244,7 +244,7 @@ exports.ParticipantsTasksHandler = class ParticipantsTasksHandler {
244
244
} ) ;
245
245
} else {
246
246
logs . push ( {
247
- level : 'info ' ,
247
+ level : 'debug ' ,
248
248
message : `No participants before activation found for campaign: ${ campaignFullName } ` ,
249
249
timestamp : Date . now ( )
250
250
} ) ;
@@ -305,7 +305,7 @@ exports.ParticipantsTasksHandler = class ParticipantsTasksHandler {
305
305
} ) ;
306
306
} else {
307
307
logs . push ( {
308
- level : 'info ' ,
308
+ level : 'debug ' ,
309
309
message : `No participants to init found for campaign: ${ campaignFullName } ` ,
310
310
timestamp : Date . now ( )
311
311
} ) ;
@@ -385,15 +385,15 @@ exports.ParticipantsTasksHandler = class ParticipantsTasksHandler {
385
385
} ) ;
386
386
} else {
387
387
logs . push ( {
388
- level : 'info ' ,
388
+ level : 'debug ' ,
389
389
message : `No participants to remind for reminder ${ i + 1 } found for campaign: ${ campaignFullName } ` ,
390
390
timestamp : Date . now ( )
391
391
} ) ;
392
392
}
393
393
}
394
394
} else {
395
395
logs . push ( {
396
- level : 'info ' ,
396
+ level : 'debug ' ,
397
397
message : `No participants to remind found for campaign: ${ campaignFullName } ` ,
398
398
timestamp : Date . now ( )
399
399
} ) ;
@@ -463,7 +463,7 @@ exports.ParticipantsTasksHandler = class ParticipantsTasksHandler {
463
463
} ) ;
464
464
} else {
465
465
logs . push ( {
466
- level : 'info ' ,
466
+ level : 'debug ' ,
467
467
message : `No participants before deactivation found for campaign: ${ campaignFullName } ` ,
468
468
timestamp : Date . now ( )
469
469
} ) ;
@@ -507,7 +507,7 @@ exports.ParticipantsTasksHandler = class ParticipantsTasksHandler {
507
507
} ) ;
508
508
} else {
509
509
logs . push ( {
510
- level : 'info ' ,
510
+ level : 'debug ' ,
511
511
message : `No participants to deactivate found for campaign: ${ campaignFullName } ` ,
512
512
timestamp : Date . now ( )
513
513
} ) ;
@@ -563,7 +563,7 @@ exports.ParticipantsTasksHandler = class ParticipantsTasksHandler {
563
563
} ) ;
564
564
} else {
565
565
logs . push ( {
566
- level : 'info ' ,
566
+ level : 'debug ' ,
567
567
message : `No interviews in progress for campaign: ${ campaignFullName } ` ,
568
568
timestamp : Date . now ( )
569
569
} ) ;
@@ -586,7 +586,7 @@ exports.ParticipantsTasksHandler = class ParticipantsTasksHandler {
586
586
} ) ;
587
587
} else {
588
588
logs . push ( {
589
- level : 'info ' ,
589
+ level : 'debug ' ,
590
590
message : `No interviews incomplete for campaign: ${ campaignFullName } ` ,
591
591
timestamp : Date . now ( )
592
592
} ) ;
@@ -607,7 +607,7 @@ exports.ParticipantsTasksHandler = class ParticipantsTasksHandler {
607
607
} ) ;
608
608
} else {
609
609
logs . push ( {
610
- level : 'info ' ,
610
+ level : 'debug ' ,
611
611
message : `No interviews completed for campaign: ${ campaignFullName } ` ,
612
612
timestamp : Date . now ( )
613
613
} ) ;
@@ -633,7 +633,7 @@ exports.ParticipantsTasksHandler = class ParticipantsTasksHandler {
633
633
}
634
634
} else {
635
635
logs . push ( {
636
- level : 'info ' ,
636
+ level : 'debug ' ,
637
637
message : `No interviews found for campaign: ${ campaignFullName } ` ,
638
638
timestamp : Date . now ( )
639
639
} ) ;
@@ -681,8 +681,8 @@ exports.ParticipantsTasksHandler = class ParticipantsTasksHandler {
681
681
return now . getTime ( ) > participant . initAt . getTime ( ) + delayMillis ;
682
682
} else if ( reminders . find ( ( r ) => r . type === 'participants-info-expire' ) === undefined ) {
683
683
// no expiration reminder must have been sent
684
- const lastRemind = participant . reminders [ participant . reminders . length - 1 ] ;
685
- return now . getTime ( ) > lastRemind . date . getTime ( ) + delayMillis ;
684
+ const lastRemind = reminders [ reminders . length - 1 ] ;
685
+ return lastRemind . date && now . getTime ( ) > ( lastRemind . date . getTime ( ) + delayMillis ) ;
686
686
}
687
687
return false ;
688
688
}
0 commit comments