mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-13 00:01:35 +08:00
debug: add temporary logging for affinity client batch query
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -369,7 +370,19 @@ func (h *AccountHandler) List(c *gin.Context) {
|
||||
}
|
||||
}
|
||||
if len(accountGroups) > 0 {
|
||||
affinityClients, _ = h.gatewayCache.GetAccountAffinityClientsBatch(c.Request.Context(), accountGroups, service.ClientAffinityTTL)
|
||||
var affinityErr error
|
||||
affinityClients, affinityErr = h.gatewayCache.GetAccountAffinityClientsBatch(c.Request.Context(), accountGroups, service.ClientAffinityTTL)
|
||||
if affinityErr != nil {
|
||||
slog.Error("GetAccountAffinityClientsBatch failed",
|
||||
"error", affinityErr,
|
||||
"account_count", len(accountGroups),
|
||||
)
|
||||
} else {
|
||||
slog.Info("GetAccountAffinityClientsBatch success",
|
||||
"account_count", len(accountGroups),
|
||||
"result_count", len(affinityClients),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user