mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
listen to shuttle ETA updates in the scheduler constructor
This commit is contained in:
@@ -17,8 +17,9 @@ export class ETANotificationScheduler {
|
|||||||
) {
|
) {
|
||||||
this.etaSubscriberCallback = this.etaSubscriberCallback.bind(this);
|
this.etaSubscriberCallback = this.etaSubscriberCallback.bind(this);
|
||||||
this.sendEtaNotificationImmediately = this.sendEtaNotificationImmediately.bind(this);
|
this.sendEtaNotificationImmediately = this.sendEtaNotificationImmediately.bind(this);
|
||||||
this.etaSubscriberCallback = this.etaSubscriberCallback.bind(this);
|
|
||||||
this.sendEtaNotificationImmediatelyIfSecondsRemainingBelowThreshold = this.sendEtaNotificationImmediatelyIfSecondsRemainingBelowThreshold.bind(this);
|
this.sendEtaNotificationImmediatelyIfSecondsRemainingBelowThreshold = this.sendEtaNotificationImmediatelyIfSecondsRemainingBelowThreshold.bind(this);
|
||||||
|
|
||||||
|
this.shuttleRepository.subscribeToEtaUpdates(this.etaSubscriberCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async sendEtaNotificationImmediately(notificationData: ScheduledNotification): Promise<boolean> {
|
private async sendEtaNotificationImmediately(notificationData: ScheduledNotification): Promise<boolean> {
|
||||||
|
|||||||
Reference in New Issue
Block a user