From 2a254f85a54961c9c119777c2787dbcc7f838017 Mon Sep 17 00:00:00 2001 From: Haiss2 Date: Fri, 12 Jul 2024 17:30:36 +0700 Subject: [PATCH] Feature/Accelerate_backfill_TradeLogs_usd_value --- pkg/pricefiller/price_fillter.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/pricefiller/price_fillter.go b/pkg/pricefiller/price_fillter.go index 4215da2..12ca51b 100644 --- a/pkg/pricefiller/price_fillter.go +++ b/pkg/pricefiller/price_fillter.go @@ -17,7 +17,8 @@ const ( NetworkETHChanID = 1 NetworkETH = "ETH" updateAllCoinInfoInterval = time.Hour - backfillTradeLogsPriceInterval = time.Hour + backfillTradeLogsPriceInterval = time.Minute + backfillTradeLogsLimit = 60 addressETH = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" coinUSDT = "USDT" ) @@ -136,7 +137,7 @@ func (p *PriceFiller) runBackFillTradelogPriceRoutine() { for range ticker.C { tradeLogs, err := p.s.Get(storage.TradeLogsQuery{ State: string(storage.TradeLogStateNew), - Limit: 100, + Limit: backfillTradeLogsLimit, }) if err != nil { p.l.Errorw("Failed to get tradeLogs", "err", err)