mirror of
https://github.com/gravitl/netmaker.git
synced 2024-09-20 15:26:04 +08:00
Merge pull request #2076 from walkerwmanuel/GRA-1270-startup-log-rework
Added more accurate startup logs
This commit is contained in:
commit
26df6f4016
9
main.go
9
main.go
|
@ -165,9 +165,14 @@ func startControllers() {
|
|||
// Should we be using a context vice a waitgroup????????????
|
||||
func runMessageQueue(wg *sync.WaitGroup) {
|
||||
defer wg.Done()
|
||||
brokerHost, secure := servercfg.GetMessageQueueEndpoint()
|
||||
logger.Log(0, "connecting to mq broker at", brokerHost, "with TLS?", fmt.Sprintf("%v", secure))
|
||||
brokerHost, _ := servercfg.GetMessageQueueEndpoint()
|
||||
logger.Log(0, "connecting to mq broker at", brokerHost)
|
||||
mq.SetupMQTT()
|
||||
if mq.IsConnected() {
|
||||
logger.Log(0, "connected to MQ Broker")
|
||||
} else {
|
||||
logger.FatalLog("error connecting to MQ Broker")
|
||||
}
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
go mq.Keepalive(ctx)
|
||||
go func() {
|
||||
|
|
|
@ -402,7 +402,7 @@ func getCustomDNS(network string) []models.DNSUpdate {
|
|||
func sendPeers() {
|
||||
|
||||
hosts, err := logic.GetAllHosts()
|
||||
if err != nil {
|
||||
if err != nil && len(hosts) > 0 {
|
||||
logger.Log(1, "error retrieving networks for keepalive", err.Error())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue