Dont update metrics when none are enabled
the build was successful
Details
the build was successful
Details
This commit is contained in:
parent
610280c5e8
commit
ae7732bfa0
|
@ -18,6 +18,7 @@ package models
|
|||
|
||||
import (
|
||||
"code.vikunja.io/api/pkg/log"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
// GetListCount returns the current list count from redis
|
||||
|
@ -40,6 +41,9 @@ func SetListCount(count int64) error {
|
|||
|
||||
// UpdateListCount updates the listcount with a given amount
|
||||
func UpdateListCount(update int64) {
|
||||
if !viper.GetBool("service.emablemetrics") {
|
||||
return
|
||||
}
|
||||
oldtotal, err := GetListCount()
|
||||
if err != nil {
|
||||
log.Log.Error(err.Error())
|
||||
|
|
Loading…
Reference in New Issue