grid2: improve some logging

This commit is contained in:
c9s 2023-10-09 17:09:41 +08:00 committed by chiahung
parent 1347c8ef87
commit 5f9d020ac8

View File

@ -42,14 +42,14 @@ func (s *Strategy) recoverActiveOrdersPeriodically(ctx context.Context) {
}
func (s *Strategy) syncActiveOrders(ctx context.Context) error {
s.logger.Infof("[ActiveOrderRecover] syncActiveOrders")
recovered := atomic.LoadInt32(&s.recovered)
if recovered == 0 {
s.logger.Infof("[ActiveOrderRecover] skip recovering active orders because recover not ready")
return nil
}
s.logger.Infof("[ActiveOrderRecover] recovering active orders with open orders")
if s.getGrid() == nil {
return nil
}