From 26c34618b2eb2f21e52cd5864d2819ef752501ba Mon Sep 17 00:00:00 2001 From: c9s Date: Tue, 5 Mar 2024 21:13:19 +0800 Subject: [PATCH] xdepthmaker: improve fixer logging --- pkg/strategy/xdepthmaker/profitfixer.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/strategy/xdepthmaker/profitfixer.go b/pkg/strategy/xdepthmaker/profitfixer.go index e2d0b48832..93234eb869 100644 --- a/pkg/strategy/xdepthmaker/profitfixer.go +++ b/pkg/strategy/xdepthmaker/profitfixer.go @@ -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 _, service := range f.sessions { + for n, service := range f.sessions { + sessionName := n 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) if err != nil { log.WithError(err).Errorf("unable to batch query trades for fixer")