MM-15186: Migrate "WebHook.GetOutgoingByTeam" to Sync by defa (#10707)
Этот коммит содержится в:
коммит произвёл
Hanzei
родитель
8252eab5da
Коммит
9f9620b4c8
@@ -108,7 +108,12 @@ func listWebhookCmdF(command *cobra.Command, args []string) error {
|
||||
incomingResult <- store.StoreResult{Data: incomingHooks, Err: err}
|
||||
close(incomingResult)
|
||||
}()
|
||||
outgoingResult := app.Srv.Store.Webhook().GetOutgoingByTeam(team.Id, 0, 100000000)
|
||||
outgoingResult := make(chan store.StoreResult, 1)
|
||||
go func() {
|
||||
outgoingHooks, err := app.Srv.Store.Webhook().GetOutgoingByTeam(team.Id, 0, 100000000)
|
||||
outgoingResult <- store.StoreResult{Data: outgoingHooks, Err: err}
|
||||
close(outgoingResult)
|
||||
}()
|
||||
|
||||
if result := <-incomingResult; result.Err == nil {
|
||||
CommandPrettyPrintln(fmt.Sprintf("Incoming webhooks for %s (%s):", team.DisplayName, team.Name))
|
||||
|
||||
Ссылка в новой задаче
Block a user