From 94f6cefd709fdfc9f459deb157e5cc78b7c89efa Mon Sep 17 00:00:00 2001 From: c9s Date: Mon, 25 Sep 2023 17:43:00 +0800 Subject: [PATCH] grid2: improve active order recover logs --- pkg/strategy/grid2/strategy.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/strategy/grid2/strategy.go b/pkg/strategy/grid2/strategy.go index d7e4210e5..90af91cba 100644 --- a/pkg/strategy/grid2/strategy.go +++ b/pkg/strategy/grid2/strategy.go @@ -2168,8 +2168,8 @@ func (s *Strategy) recoverActiveOrders(ctx context.Context, session *bbgo.Exchan } s.logger.Infof("found %d active orders to update...", len(activeOrders)) - for _, o := range activeOrders { - s.logger.Infof("updating %d order...", o.OrderID) + for i, o := range activeOrders { + s.logger.Infof("updating %d/%d order #%d...", i+1, len(activeOrders), o.OrderID) updatedOrder, err := retry.QueryOrderUntilSuccessful(ctx, s.orderQueryService, types.OrderQuery{ Symbol: o.Symbol, @@ -2181,6 +2181,7 @@ func (s *Strategy) recoverActiveOrders(ctx context.Context, session *bbgo.Exchan return } + s.logger.Infof("triggering updated order #%d: %s", o.OrderID, o.String()) activeOrderBook.Update(*updatedOrder) } }