From 35d2caa965687d5c98302dd8ec5dd636d0177cdd Mon Sep 17 00:00:00 2001 From: Ian McEwen Date: Mon, 30 Sep 2024 13:01:41 -0700 Subject: [PATCH] actually call to configure VICE URL --- analyses.go | 3 +++ main.go | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/analyses.go b/analyses.go index 2a2eb9a..4c8213a 100644 --- a/analyses.go +++ b/analyses.go @@ -52,6 +52,9 @@ type Job struct { } func (j *Job) accessURL() (string, error) { + if VICEURI == "" { + return "", nil + } vice_uri, err := url.Parse(VICEURI) if err != nil { return "", errors.Wrapf(err, "Error parsing VICE URI from %s", VICEURI) diff --git a/main.go b/main.go index a486136..33b8a48 100644 --- a/main.go +++ b/main.go @@ -145,6 +145,7 @@ func ConfigureUserLookups(cfg *viper.Viper) error { return nil } +// ConfigureAnalyses sets up the base VICE url func ConfigureAnalyses(cfg *viper.Viper) error { viceBase := cfg.GetString("k8s.frontend.base") if viceBase == "" { @@ -422,6 +423,12 @@ func main() { } log.Info("done configuring user lookups") + log.Info("configuring VICE URL...") + if err = ConfigureAnalyses(cfg); err != nil { + log.Fatal(err) + } + log.Info("done configuring VICE URL") + var k8sEnabled bool if cfg.InConfig("vice.k8s-enabled") { k8sEnabled = cfg.GetBool("vice.k8s-enabled")