MM-7188: Cleaning push notification on every read, not only on channel switch (#9348)
* MM-7188: Cleaning push notification on every read, not only on channel switch * Removed unnecesary goroutine * Fixing tests * Applying suggestion from PR
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
37e00ef916
Коммит
15d64fb201
@@ -50,6 +50,8 @@ type App struct {
|
||||
Hubs []*Hub
|
||||
HubsStopCheckingForDeadlock chan bool
|
||||
|
||||
PushNotificationsHub PushNotificationsHub
|
||||
|
||||
Jobs *jobs.JobServer
|
||||
|
||||
AccountMigration einterfaces.AccountMigrationInterface
|
||||
@@ -128,6 +130,9 @@ func New(options ...Option) (outApp *App, outErr error) {
|
||||
|
||||
app.HTTPService = MakeHTTPService(app)
|
||||
|
||||
app.CreatePushNotificationsHub()
|
||||
app.StartPushNotificationsHubWorkers()
|
||||
|
||||
defer func() {
|
||||
if outErr != nil {
|
||||
app.Shutdown()
|
||||
@@ -276,6 +281,7 @@ func (a *App) Shutdown() {
|
||||
|
||||
a.StopServer()
|
||||
a.HubStop()
|
||||
a.StopPushNotificationsHubWorkers()
|
||||
|
||||
a.ShutDownPlugins()
|
||||
a.WaitForGoroutines()
|
||||
|
||||
Ссылка в новой задаче
Block a user