diff --git a/ArenaService/ArenaService/ArenaWorker.cs b/ArenaService/ArenaService/ArenaWorker.cs index 24444ec..b48f54c 100644 --- a/ArenaService/ArenaService/ArenaWorker.cs +++ b/ArenaService/ArenaService/ArenaWorker.cs @@ -79,7 +79,6 @@ public async Task PrepareArenaParticipants() var avatarAddrAndScoresWithRank = await _rpcClient.AvatarAddrAndScoresWithRank(tip, avatarAddrList, currentRoundData); var result = await _rpcClient.GetArenaParticipants(tip, avatarAddrList, avatarAddrAndScoresWithRank); await _service.SetArenaParticipantsAsync(cacheKey, result, expiry); - await _service.SetAvatarAddrAndScoresWithRank(scoreCacheKey, avatarAddrAndScoresWithRank, expiry); await _service.SetSeasonAsync(cacheKey, expiry); sw.Stop(); _logger.LogInformation("[ArenaParticipantsWorker]Set Arena Cache[{CacheKey}]: {Elapsed}", cacheKey, sw.Elapsed); diff --git a/ArenaService/ArenaService/StateQuery.cs b/ArenaService/ArenaService/StateQuery.cs index f4f561c..16c4436 100644 --- a/ArenaService/ArenaService/StateQuery.cs +++ b/ArenaService/ArenaService/StateQuery.cs @@ -45,12 +45,11 @@ public StateQuery(IRedisArenaParticipantsService redisArenaParticipantsService) return result; } - var scores = await redisArenaParticipantsService1.GetAvatarAddrAndScoresWithRank($"{cacheKey}_score"); - var avatarScore = scores.FirstOrDefault(r => r.AvatarAddr == currentAvatarAddr); - if (avatarScore?.Score > 0) var cached = await redisArenaParticipantsService1.GetArenaParticipantsAsync(cacheKey); + var avatarScore = cached.FirstOrDefault(r => r.AvatarAddr == currentAvatarAddr).Score; + if (avatarScore > 0) { - playerScore = avatarScore.Score; + playerScore = avatarScore; } foreach (var arenaParticipant in cached) {