Skip to content

Commit

Permalink
Merge pull request netobserv#114 from eranra/fix_111
Browse files Browse the repository at this point in the history
move health.NewHealthServer before mainPipeline.Run
  • Loading branch information
eranra committed Mar 3, 2022
2 parents 6d1be78 + fc06037 commit b3e78de
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions cmd/flowlogs-pipeline/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ package main
import (
"encoding/json"
"fmt"
"os"
"path/filepath"
"strings"
"time"

jsoniter "github.com/json-iterator/go"
"github.com/netobserv/flowlogs-pipeline/pkg/config"
"github.com/netobserv/flowlogs-pipeline/pkg/health"
Expand All @@ -29,10 +34,6 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/spf13/viper"
"os"
"path/filepath"
"strings"
"time"
)

var (
Expand Down Expand Up @@ -172,12 +173,12 @@ func run() {
os.Exit(1)
}

// Starts the flows pipeline
mainPipeline.Run()

// Start health report server
health.NewHealthServer(mainPipeline)

// Starts the flows pipeline
mainPipeline.Run()

// Give all threads a chance to exit and then exit the process
time.Sleep(time.Second)
log.Debugf("exiting main run")
Expand Down

0 comments on commit b3e78de

Please sign in to comment.