mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
core: add recover logs for the recovered trade count
This commit is contained in:
parent
70439f3fd9
commit
c13a5cdf6e
|
@ -99,13 +99,17 @@ func (c *TradeCollector) Recover(ctx context.Context, ex types.ExchangeTradeHist
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cnt := 0
|
||||||
for _, td := range trades {
|
for _, td := range trades {
|
||||||
logrus.Debugf("checking trade: %s", td.String())
|
logrus.Debugf("checking trade: %s", td.String())
|
||||||
if c.processTrade(td) {
|
if c.processTrade(td) {
|
||||||
logrus.Infof("recovered trade: %s", td.String())
|
logrus.Infof("recovered trade: %s", td.String())
|
||||||
|
cnt++
|
||||||
c.EmitRecover(td)
|
c.EmitRecover(td)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logrus.Infof("%d %s trades were recovered", cnt, symbol)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user