fix: rmq
All checks were successful
Build and Deploy Go App / build (push) Successful in 6m46s
Build and Deploy Go App / deploy (push) Successful in 53s

This commit is contained in:
Iron_Felix 2025-12-05 21:20:51 +03:00
parent 6a5994e33e
commit 62e0633e69
4 changed files with 53 additions and 187 deletions

View file

@ -9,24 +9,24 @@ import (
"strconv"
)
type Handler struct {
publisher *rmq.Publisher
}
// type Handler struct {
// publisher *rmq.Publisher
// }
func New(publisher *rmq.Publisher) *Handler {
return &Handler{publisher: publisher}
}
// func New(publisher *rmq.Publisher) *Handler {
// return &Handler{publisher: publisher}
// }
type Server struct {
db *sqlc.Queries
publisher *rmq.Publisher
db *sqlc.Queries
// publisher *rmq.Publisher
RPCclient *rmq.RPCClient
}
func NewServer(db *sqlc.Queries, publisher *rmq.Publisher, rpcclient *rmq.RPCClient) *Server {
func NewServer(db *sqlc.Queries, rpcclient *rmq.RPCClient) *Server {
return &Server{
db: db,
publisher: publisher,
db: db,
// publisher: publisher,
RPCclient: rpcclient,
}
}

View file

@ -197,7 +197,6 @@ func (s Server) GetTitles(ctx context.Context, request oapi.GetTitlesRequestObje
// Делаем RPC-вызов — и ЖДЁМ ответа
err := s.RPCclient.Call(
ctx,
"svc.media.process.requests", // ← очередь микросервиса
mqreq,
&reply,
)