package main import ( "fmt" "time" "git.uploadfilter24.eu/covidnetes/woodpecker-autoscaler/internal/config" "git.uploadfilter24.eu/covidnetes/woodpecker-autoscaler/internal/health" "git.uploadfilter24.eu/covidnetes/woodpecker-autoscaler/internal/logging" "git.uploadfilter24.eu/covidnetes/woodpecker-autoscaler/internal/woodpecker" log "github.com/sirupsen/logrus" ) func main() { cfg, err := config.GenConfig() logging.ConfigureLogger(cfg) if err != nil { log.WithFields(log.Fields{ "Caller": "Main", }).Fatal(fmt.Sprintf("Error generating Config: %s", err.Error())) } go func() { log.WithFields(log.Fields{ "Caller": "Main", }).Info("Starting Health Endpoint") health.StartHealthEndpoint() }() log.WithFields(log.Fields{ "Caller": "Main", }).Info("Entering main event loop") for { woodpecker.CheckPending(cfg) time.Sleep(time.Duration(cfg.CheckInterval) * time.Minute) } }