[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) }, plugin.UserHasBeenCreatedID)
}) })
_, cwsErr := a.SendSubscriptionHistoryEvent(ruser.Id) // Create/Update the subscriptionHistoryEvent
if cwsErr != nil { go func() {
c.Logger().Error("Failed to create/update the SubscriptionHistoryEvent", mlog.Err(cwsErr)) _, err := a.SendSubscriptionHistoryEvent(ruser.Id)
} if err != nil {
c.Logger().Error("Failed to create/update the SubscriptionHistoryEvent", mlog.Err(err))
}
}()
return ruser, nil return ruser, nil
} }