Skip to content

Commit

Permalink
update tvl every 15 minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
bonedaddy committed Jan 24, 2021
1 parent 478144b commit bbbcbc5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cmd/gondx/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,8 @@ func main() {
func dbPriceUpdateLoop(ctx context.Context, bc *bclient.Client, db *db.Database) {
ticker := time.NewTicker(time.Second * 60) // update every 1m
defer ticker.Stop()
// this will tick less frequently as its an extremely expensive RPC to calculate
// a single price update likely requires 100 -> 150 RPC calls
tvlTicker := time.NewTicker(time.Hour)
// update TVL every 15 minutes
tvlTicker := time.NewTicker(time.Minute * 15)
defer tvlTicker.Stop()

// update the tvl price before looping to insert some data
Expand Down

0 comments on commit bbbcbc5

Please sign in to comment.