From b3cff39fb69dfd52dd175441f27e04928b937764 Mon Sep 17 00:00:00 2001 From: artaasadi Date: Fri, 27 Dec 2024 17:45:53 +0100 Subject: [PATCH] fix: tasks server start --- services/tasks/cmd.go | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/services/tasks/cmd.go b/services/tasks/cmd.go index 76814d1e1..4fa8e536b 100644 --- a/services/tasks/cmd.go +++ b/services/tasks/cmd.go @@ -100,18 +100,11 @@ func start(ctx context.Context) error { return err } - errors := make(chan error, 1) - go func() { - routes := httpRoutes{ - logger: logger, - db: db, - mainScheduler: mainScheduler, - } - errors <- fmt.Errorf("http server: %w", httpserver.RegisterAndStart(ctx, logger, cfg.Http.Address, &routes)) - }() - - return <-errors - + return httpserver.RegisterAndStart(ctx, logger, cfg.Http.Address, &httpRoutes{ + logger: logger, + db: db, + mainScheduler: mainScheduler, + }) } func NewKubeClient() (client.Client, error) {