diff --git a/v2/cmd/price_filler/main.go b/v2/cmd/price_filler/main.go index 2a582cd..fd9edce 100644 --- a/v2/cmd/price_filler/main.go +++ b/v2/cmd/price_filler/main.go @@ -78,7 +78,12 @@ func run(c *cli.Context) error { l.Errorw("Error while init price filler") return err } - priceFiller.Run(c.Duration(libapp.FillPriceTimeIntervalFlag.Name)) + fillPriceInterval := c.Duration(libapp.FillPriceTimeIntervalFlag.Name) + if fillPriceInterval <= 0 { + l.Errorw("invalid value of fill-price-time-interval-flag") + return fmt.Errorf("invalid value of fill-price-time-interval-flag") + } + priceFiller.Run(fillPriceInterval) return nil }