From 3d5ea25eb30c77371306f398c4ae14acfcf0abfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Ramon=20Ma=C3=B1es?= Date: Tue, 14 Nov 2023 11:16:02 +0100 Subject: [PATCH] feat(torch): reorder imports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jose Ramon MaƱes --- pkg/http/server.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/http/server.go b/pkg/http/server.go index d58ddc7..d55afbc 100644 --- a/pkg/http/server.go +++ b/pkg/http/server.go @@ -2,7 +2,6 @@ package handlers import ( "context" - "golang.org/x/sync/errgroup" "net/http" "os" "os/signal" @@ -12,6 +11,7 @@ import ( "github.com/gorilla/mux" log "github.com/sirupsen/logrus" + "golang.org/x/sync/errgroup" "github.com/celestiaorg/torch/config" "github.com/celestiaorg/torch/pkg/db/redis" @@ -80,9 +80,9 @@ func Run(cfg config.MutualPeersConfig) { log.Info("Server Started...") log.Info("Listening on port: " + httpPort) - go BackgroundGenerateLBMetric() - // check if Torch has to generate the metric or not. + // check if Torch has to generate the metric or not, we invoke this function async to continue the execution flow. go BackgroundGenerateHashMetric(cfg) + go BackgroundGenerateLBMetric() // Initialize the goroutine to check the nodes in the queue. log.Info("Initializing queues to process the nodes...")