xdepthmaker: improve fixer logging

This commit is contained in:
c9s 2024-03-05 21:13:19 +08:00
parent 4bed29ad02
commit 26c34618b2
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -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")