feat: now back wait for RMQ answer
All checks were successful
Build and Deploy Go App / build (push) Successful in 6m20s
Build and Deploy Go App / deploy (push) Successful in 1m1s

This commit is contained in:
Iron_Felix 2025-11-30 04:02:28 +03:00
parent a29aefbe97
commit ab29c33f5b
4 changed files with 143 additions and 30 deletions

View file

@ -60,8 +60,9 @@ func main() {
defer rmqConn.Close()
publisher := rmq.NewPublisher(rmqConn)
rpcClient := rmq.NewRPCClient(rmqConn, 30*time.Second)
server := handlers.NewServer(queries, publisher)
server := handlers.NewServer(queries, publisher, rpcClient)
// r.LoadHTMLGlob("templates/*")
r.Use(cors.New(cors.Config{
@ -79,9 +80,6 @@ func main() {
[]oapi.StrictMiddlewareFunc{},
))
// Внедряем publisher в сервер
server = handlers.NewServer(queries, publisher)
// Запуск
log.Infof("Server starting on :8080")
if err := r.Run(":8080"); err != nil && err != http.ErrServerClosed {