Skip to content

Commit

Permalink
refactor: improve logging formatting in SendSubscriberRemindersOnEven…
Browse files Browse the repository at this point in the history
…tScheduled job
  • Loading branch information
simlarsen committed Jan 16, 2025
1 parent 493aef5 commit 6bfd9b6
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ RunCron(

logger.debug(
"ScheduledMaintenance:SendSubscriberRemindersOnEventScheduled: Found " +
scheduledEvents.length +
" events",
scheduledEvents.length +
" events",
);

for (const event of scheduledEvents) {
try {
logger.debug(
"ScheduledMaintenance:SendSubscriberRemindersOnEventScheduled: Sending notification for event: " +
event.id,
event.id,
);

const nextSubscriberNotificationAt: Date | null =
Expand All @@ -69,7 +69,7 @@ RunCron(

logger.debug(
"ScheduledMaintenance:SendSubscriberRemindersOnEventScheduled: Next subscriber notification at: " +
nextSubscriberNotificationAt,
nextSubscriberNotificationAt,
);

await ScheduledMaintenanceService.updateOneById({
Expand All @@ -85,17 +85,16 @@ RunCron(

logger.debug(
"ScheduledMaintenance:SendSubscriberRemindersOnEventScheduled: Notification sent for event: " +
event.id,
event.id,
);
} catch (err) {
logger.error(
"ScheduledMaintenance:SendSubscriberRemindersOnEventScheduled: Error sending notification for event: " +
event.id,
event.id,
);
logger.error(err);
}


const scheduledMaintenanceFeedText: string = `**Reminder Notification Sent to Subscribers**:
Reminder notification sent to status page subscribers because this scheduled maintenance is about to start.`;
Expand Down

0 comments on commit 6bfd9b6

Please sign in to comment.