Disable metrics if interval is less or equal to 0
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
parent
4796ec8d9d
commit
e500586d8f
1 changed files with 4 additions and 2 deletions
|
@ -34,8 +34,10 @@ func setAppBefore(app *cli.App) {
|
|||
app.Before = func(context *cli.Context) error {
|
||||
if context.GlobalBool("debug") {
|
||||
logrus.SetLevel(logrus.DebugLevel)
|
||||
if err := debugMetrics(context.GlobalDuration("metrics-interval"), context.GlobalString("graphite-address")); err != nil {
|
||||
return err
|
||||
if context.GlobalDuration("metrics-interval") > 0 {
|
||||
if err := debugMetrics(context.GlobalDuration("metrics-interval"), context.GlobalString("graphite-address")); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
if err := checkLimits(); err != nil {
|
||||
|
|
Loading…
Reference in a new issue