fix: rmq
This commit is contained in:
parent
6a5994e33e
commit
62e0633e69
4 changed files with 53 additions and 187 deletions
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue