Browse Source
* Noop notifications for dev We rarely have notifications set up for development environments, this removes the error messages related to missing server notification services * Log actions in noop service * Add line breaks * Improve log messages * Ignore local config at all levelspull/6681/head
9 changed files with 45 additions and 8 deletions
@ -1,3 +1,2 @@
@@ -1,3 +1,2 @@
|
||||
!dev-server.shared.pem |
||||
config/local.json |
||||
stats.json |
||||
|
||||
@ -0,0 +1,28 @@
@@ -0,0 +1,28 @@
|
||||
import { NotificationsService as NotificationsServiceAbstraction } from "../../abstractions/notifications.service"; |
||||
import { LogService } from "../abstractions/log.service"; |
||||
|
||||
export class NoopNotificationsService implements NotificationsServiceAbstraction { |
||||
constructor(private logService: LogService) {} |
||||
|
||||
init(): Promise<void> { |
||||
this.logService.info( |
||||
"Initializing no-op notification service, no push notifications will be received" |
||||
); |
||||
return Promise.resolve(); |
||||
} |
||||
|
||||
updateConnection(sync?: boolean): Promise<void> { |
||||
this.logService.info("Updating notification service connection"); |
||||
return Promise.resolve(); |
||||
} |
||||
|
||||
reconnectFromActivity(): Promise<void> { |
||||
this.logService.info("Reconnecting notification service from activity"); |
||||
return Promise.resolve(); |
||||
} |
||||
|
||||
disconnectFromInactivity(): Promise<void> { |
||||
this.logService.info("Disconnecting notification service from inactivity"); |
||||
return Promise.resolve(); |
||||
} |
||||
} |
||||
Loading…
Reference in new issue