feat: now back wait for RMQ answer
This commit is contained in:
parent
a29aefbe97
commit
ab29c33f5b
4 changed files with 143 additions and 30 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue