From 3206842fe818e2d3a7d11fba18e6bada918b203e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 25 Jul 2022 17:10:41 +0200 Subject: [PATCH] Manager: log "own URLs" last, to make them more visible Logging the URLs at which the Manager can be reached as the last thing when starting up, in the hope that this makes them more noticable and inviting to actually visit. --- cmd/flamenco-manager/main.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cmd/flamenco-manager/main.go b/cmd/flamenco-manager/main.go index 4866730a..1c6eea27 100644 --- a/cmd/flamenco-manager/main.go +++ b/cmd/flamenco-manager/main.go @@ -138,12 +138,11 @@ func runFlamencoManager() bool { _, port, _ := net.SplitHostPort(listen) log.Info().Str("port", port).Msg("listening") - // Find our URLs, and log them for the user's convenience. + // Find our URLs. urls, err := own_url.AvailableURLs("http", listen) if err != nil { log.Fatal().Err(err).Msg("unable to figure out my own URL") } - logURLs(urls) ssdp := makeAutoDiscoverable(urls) @@ -235,6 +234,12 @@ func runFlamencoManager() bool { sleepScheduler.Run(mainCtx) }() + // Log the URLs last, hopefully that makes them more visible / encouraging to go to for users. + go func() { + time.Sleep(100 * time.Millisecond) + logURLs(urls) + }() + // Open a webbrowser, but give the web service some time to start first. if isFirstRun { go openWebbrowser(mainCtx, urls[0])