From 085114b244c91412e2f7fa61bac559d889f290e2 Mon Sep 17 00:00:00 2001 From: c9s Date: Fri, 30 Jun 2023 11:07:02 +0800 Subject: [PATCH] grid2: add warning message when failed to acquire the lock --- pkg/strategy/grid2/strategy.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/strategy/grid2/strategy.go b/pkg/strategy/grid2/strategy.go index 11abe0f7b..6a38c5f1f 100644 --- a/pkg/strategy/grid2/strategy.go +++ b/pkg/strategy/grid2/strategy.go @@ -1183,6 +1183,8 @@ func (s *Strategy) updateGridNumOfOrdersMetricsWithLock() { grid := s.grid s.mu.Unlock() s.updateGridNumOfOrdersMetrics(grid) + } else { + s.logger.Warnf("updateGridNumOfOrdersMetricsWithLock: failed to acquire the lock to update metrics") } }