in src/bll/notifications/NewNotificationWatcher.ts [33:55]
private async activate(): Promise<void> {
Logger.logInfo("NotificationWatcherImpl#activate: NW was activated");
try {
await this.tryReinitWatcherMutableResources();
} catch (err) {
Logger.logError(`NotificationWatcherImpl#activate: an error occurs: ${err}.`);
}
while (!this.shouldBeDisposed) {
try {
await this.processNewChangesIfRequired();
} catch (err) {
Logger.logError(`NotificationWatcherImpl#activate: an error occurs: ${err}.`);
await this.tryReinitWatcherMutableResources();
}
await Utils.sleep(this.CHECK_FREQUENCY_MS);
if (this.isNotTheSameUser()) {
Logger.logInfo("NotificationWatcherImpl#activate: User has changed. ");
await this.tryReinitWatcherMutableResources();
}
}
Logger.logDebug("NotificationWatcherImpl#activate: finish watching.");
}