Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Prrromanssss committed Apr 25, 2024
1 parent 881f177 commit 4ff2ea1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 4 additions & 2 deletions backend/cmd/orchestrator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,17 @@ func main() {
}
}()

log.Info("server stopped")
log.Info("http-server stopped")

// Graceful shotdown
stop := make(chan os.Signal, 1)
signal.Notify(stop, syscall.SIGTERM, syscall.SIGINT)

sign := <-stop

log.Info("stopping agent", slog.String("signal", sign.String()))
log.Info("stopping http-server", slog.String("signal", sign.String()))

application.Stop(ctxWithCancel, cfg)

log.Info("http-server stopped")
}
3 changes: 1 addition & 2 deletions backend/internal/lib/logger/setup/pretty_logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ func SetupPrettySlog() *slog.Logger {
},
}

handler := opts.NewPrettyHandler(os.Stdout) // os.Stdout !!!

handler := opts.NewPrettyHandler(os.Stdout)
return slog.New(handler)
}

0 comments on commit 4ff2ea1

Please sign in to comment.