Initial migration of the store to be sync (#10592)
* Migrating audit store * Final migration example for the audit store * async example * Ending migration * Removing Async helper * Fixing tests * Fixing govet problems with the StoreResult instanstiation
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
957ec1388b
Коммит
12c50eb830
@@ -610,7 +610,12 @@ func (a *App) HandleIncomingWebhook(hookId string, req *model.IncomingWebhookReq
|
||||
hook = result.Data.(*model.IncomingWebhook)
|
||||
}
|
||||
|
||||
uchan := a.Srv.Store.User().Get(hook.UserId)
|
||||
uchan := make(chan store.StoreResult, 1)
|
||||
go func() {
|
||||
user, err := a.Srv.Store.User().Get(hook.UserId)
|
||||
uchan <- store.StoreResult{Data: user, Err: err}
|
||||
close(uchan)
|
||||
}()
|
||||
|
||||
if len(req.Props) == 0 {
|
||||
req.Props = make(model.StringInterface)
|
||||
|
||||
Ссылка в новой задаче
Block a user