Skip to content

Commit

Permalink
fix save candles
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfatman committed Oct 26, 2024
1 parent 1aada31 commit 61a9024
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
//}
}
}()
}
Expand Down

0 comments on commit 61a9024

Please sign in to comment.