From 9aa6490e8d6b953e0cc2b1c39fcc8830ee472fda Mon Sep 17 00:00:00 2001 From: mlogclub Date: Sun, 7 Jun 2026 19:42:54 +0800 Subject: [PATCH] feat: improve logging in wxWorkKFOutboundService to only log when batches are dispatched --- internal/services/wxwork_kf_outbound_service.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/internal/services/wxwork_kf_outbound_service.go b/internal/services/wxwork_kf_outbound_service.go index 5f2ae83..e2f428a 100644 --- a/internal/services/wxwork_kf_outbound_service.go +++ b/internal/services/wxwork_kf_outbound_service.go @@ -49,10 +49,12 @@ func (s *wxWorkKFOutboundService) DispatchPendingOutbox() int { count := s.doDispatchPendingOutbox(wxWorkKFOutboxBatchSize) totalCount += count - slog.Info("wxwork kf outbound dispatch loop", - "batch_count", count, - "total_count", totalCount, - ) + if count > 0 { + slog.Info("wxwork kf outbound dispatch loop", + "batch_count", count, + "total_count", totalCount, + ) + } if count == 0 { break