mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 01:01:56 +00:00
xdepthmaker: fix loopvar issue
This commit is contained in:
parent
26c34618b2
commit
0d3483e7c3
|
@ -51,8 +51,10 @@ func (f *ProfitFixer) Fix(ctx context.Context, since, until time.Time, stats *ty
|
|||
var allTrades = make([]types.Trade, 0, 1000)
|
||||
|
||||
g, subCtx := errgroup.WithContext(ctx)
|
||||
for n, service := range f.sessions {
|
||||
for n, s := range f.sessions {
|
||||
// allocate a copy of the iteration variables
|
||||
sessionName := n
|
||||
service := s
|
||||
g.Go(func() error {
|
||||
log.Infof("batch querying %s trade history from %s since %s until %s", f.market.Symbol, sessionName, since.String(), until.String())
|
||||
trades, err := f.batchQueryTrades(subCtx, service, f.market.Symbol, since, until)
|
||||
|
|
Loading…
Reference in New Issue
Block a user