Browse Source

print a log message when the nats connection is not available

Tobias von Dewitz 6 years ago
parent
commit
6595810e6a
1 changed files with 3 additions and 0 deletions
  1. 3 0
      main.go

+ 3 - 0
main.go

@@ -353,6 +353,9 @@ func publishRequest(queue string, request *data.Request) {
 	}
 	}
 
 
 	if !natsIsAvailable {
 	if !natsIsAvailable {
+		if rand.Intn(100) == 0 {
+			log.Println("nats connection is not available")
+		}
 		return
 		return
 	}
 	}