directly save ranked to ranked bucket

This commit is contained in:
Álvaro 2024-06-14 03:01:06 +02:00
parent c3de834f57
commit 75ec6a49e9
2 changed files with 13 additions and 2 deletions

View File

@ -12,7 +12,9 @@ defmodule LolAnalyticsWeb.ChampionComponents.SummonerSpells do
<p><%= spell.win_rate %>%</p> <p><%= spell.win_rate %>%</p>
<p><%= spell.wins %>/<%= spell.total_games %></p> <p><%= spell.wins %>/<%= spell.total_games %></p>
</div> </div>
<div class="tooltip -my-8 px-4 py-2 rounded-xl"><%= spell.name %></div> <div class="tooltip -my-8 px-4 py-2 rounded-xl">
<p><%= spell.name %></p>
</div>
</div> </div>
<% end %> <% end %>
</div> </div>

View File

@ -44,7 +44,16 @@ defmodule Scrapper.Processor.MatchProcessor do
def process_resp({:ok, raw_match}, match_id) do def process_resp({:ok, raw_match}, match_id) do
decoded_match = Poison.decode!(raw_match, as: %LoLAPI.Model.MatchResponse{}) decoded_match = Poison.decode!(raw_match, as: %LoLAPI.Model.MatchResponse{})
match_url = Storage.MatchStorage.S3MatchStorage.store_match(match_id, raw_match, "matches")
match_url =
case decoded_match.info.queueId do
420 ->
Storage.MatchStorage.S3MatchStorage.store_match(match_id, raw_match, "ranked")
queue_id ->
Storage.MatchStorage.S3MatchStorage.store_match(match_id, raw_match, queue_id)
end
match = LolAnalytics.Match.MatchRepo.get_match(match_id) match = LolAnalytics.Match.MatchRepo.get_match(match_id)
case match do case match do