From 61a9024e22556758b771c3182d41273500bbd342 Mon Sep 17 00:00:00 2001 From: 0xfatman <0xfatman@proton.me> Date: Sat, 26 Oct 2024 15:40:04 +0100 Subject: [PATCH] fix save candles --- store/store.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/store/store.go b/store/store.go index 7057e3e..024483a 100644 --- a/store/store.go +++ b/store/store.go @@ -249,7 +249,7 @@ func (s *Store) SyncCandles() { }() go func() { for range time.NewTicker(time.Second * 15).C { - oldestTimestamp := time.Now().Add(-s.intervals[0].Retention).UnixMilli() + //oldestTimestamp := time.Now().Add(-s.intervals[0].Retention).UnixMilli() for _, config := range s.config { go func() { candles := make([]*data.Candle, 0) @@ -258,9 +258,9 @@ func (s *Store) SyncCandles() { } for _, candle := range candles { candle.MarketId = config.MarketId - if int64(candle.ClosingTimestamp) >= oldestTimestamp { - s.SaveCandle(candle) - } + //if int64(candle.ClosingTimestamp) >= oldestTimestamp { + s.SaveCandle(candle) + //} } }() }