[MM-48649]: Call the SendSubscriptionHistoryEvent function in a GO routine (#21836)

Этот коммит содержится в:
emmyni
2022-12-08 17:07:34 -05:00
коммит произвёл GitHub
родитель 671959333e
Коммит a0fe5014a9

Просмотреть файл

@@ -316,10 +316,13 @@ func (a *App) createUserOrGuest(c request.CTX, user *model.User, guest bool) (*m
}, plugin.UserHasBeenCreatedID)
})
_, cwsErr := a.SendSubscriptionHistoryEvent(ruser.Id)
if cwsErr != nil {
c.Logger().Error("Failed to create/update the SubscriptionHistoryEvent", mlog.Err(cwsErr))
}
// Create/Update the subscriptionHistoryEvent
go func() {
_, err := a.SendSubscriptionHistoryEvent(ruser.Id)
if err != nil {
c.Logger().Error("Failed to create/update the SubscriptionHistoryEvent", mlog.Err(err))
}
}()
return ruser, nil
}