From f2a2dd74f6efbff8f364b79a745ad51e507125a1 Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Thu, 27 Mar 2025 10:58:20 -0700 Subject: [PATCH] listen to shuttle ETA updates in the scheduler constructor --- src/notifications/schedulers/ETANotificationScheduler.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/notifications/schedulers/ETANotificationScheduler.ts b/src/notifications/schedulers/ETANotificationScheduler.ts index bb820b9..943b74d 100644 --- a/src/notifications/schedulers/ETANotificationScheduler.ts +++ b/src/notifications/schedulers/ETANotificationScheduler.ts @@ -17,8 +17,9 @@ export class ETANotificationScheduler { ) { this.etaSubscriberCallback = this.etaSubscriberCallback.bind(this); this.sendEtaNotificationImmediately = this.sendEtaNotificationImmediately.bind(this); - this.etaSubscriberCallback = this.etaSubscriberCallback.bind(this); this.sendEtaNotificationImmediatelyIfSecondsRemainingBelowThreshold = this.sendEtaNotificationImmediatelyIfSecondsRemainingBelowThreshold.bind(this); + + this.shuttleRepository.subscribeToEtaUpdates(this.etaSubscriberCallback); } private async sendEtaNotificationImmediately(notificationData: ScheduledNotification): Promise {