Skip to content

Commit

Permalink
Merge pull request #2313 from opengovern/fix-tasks
Browse files Browse the repository at this point in the history
fix: tasks server start
  • Loading branch information
artaasadi authored Dec 27, 2024
2 parents d907cba + b3cff39 commit 6a99960
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions services/tasks/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6a99960

Please sign in to comment.