Redis -> YDB

This commit is contained in:
Artyom Belousov 2023-05-27 22:10:31 +03:00
parent 1f4888069f
commit a33680d527
21 changed files with 448 additions and 322 deletions

View file

@ -1,6 +1,7 @@
package vk
import (
"context"
"net/http"
"github.com/gin-gonic/gin"
@ -8,7 +9,7 @@ import (
)
type Handler struct {
Scenario *scenario.Scenario
Scenario *scenario.Scenario
SecretKey string
GroupId int64
ConfirmationString string
@ -54,7 +55,7 @@ func (h *Handler) HandleMessage(c *gin.Context) {
case "confirmation":
h.handleConfirmation(c, &req)
case "message_new":
go h.Scenario.HandleSearch(&scenario.UserMessage{
go h.Scenario.HandleSearch(context.Background(), &scenario.UserMessage{
Body: req.Object.Body,
UserId: req.Object.UserId,
})