Skip to content

Commit

Permalink
add condition for fill-price-time-interval-flag
Browse files Browse the repository at this point in the history
  • Loading branch information
iostream1308 committed Dec 20, 2024
1 parent 889b9a2 commit 8c646f2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion v2/cmd/price_filler/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 8c646f2

Please sign in to comment.