Fixed metrics endpoint not working

This commit is contained in:
konrad 2019-05-12 16:49:16 +02:00
parent 3d7fd9ca20
commit de24fcc2f8
Signed by untrusted user who does not match committer: konrad
GPG key ID: F40E70337AB24C9B
5 changed files with 41 additions and 23 deletions

View file

@ -24,8 +24,8 @@ import (
var r *redis.Client
// SetRedis initializes a redis connection
func init() {
// InitRedis initializes a redis connection
func InitRedis() {
if !viper.GetBool("redis.enabled") {
return
}
@ -44,6 +44,7 @@ func init() {
if err != nil {
log.Log.Fatal(err.Error())
}
log.Log.Debug("Redis initialized")
}
// GetRedis returns a pointer to a redis client