core: add recover logs for the recovered trade count

This commit is contained in:
c9s 2023-07-22 17:32:24 +08:00
parent 70439f3fd9
commit c13a5cdf6e
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -99,13 +99,17 @@ func (c *TradeCollector) Recover(ctx context.Context, ex types.ExchangeTradeHist
return err
}
cnt := 0
for _, td := range trades {
logrus.Debugf("checking trade: %s", td.String())
if c.processTrade(td) {
logrus.Infof("recovered trade: %s", td.String())
cnt++
c.EmitRecover(td)
}
}
logrus.Infof("%d %s trades were recovered", cnt, symbol)
return nil
}