From b1605cef707adf8872be74cc5132f3f2159fdf88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro?= Date: Sun, 12 May 2024 18:22:23 +0200 Subject: [PATCH] fix match classifier --- apps/scrapper/lib/scrapper/match_classifier.ex | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/scrapper/lib/scrapper/match_classifier.ex b/apps/scrapper/lib/scrapper/match_classifier.ex index c32bec3..3deee45 100644 --- a/apps/scrapper/lib/scrapper/match_classifier.ex +++ b/apps/scrapper/lib/scrapper/match_classifier.ex @@ -8,7 +8,7 @@ defmodule Scrapper.MatchClassifier do @spec classify_match_by_queue(String.t()) :: nil def classify_match_by_queue("420") do - matches = Storage.MatchStorage.S3MatchStorage.list_matches() + matches = Storage.MatchStorage.S3MatchStorage.list_files("matches") total_matches = Enum.count(matches) matches @@ -16,7 +16,11 @@ defmodule Scrapper.MatchClassifier do |> Scrapper.Parallel.peach(fn {match, index} -> %{key: json_file} = match [key | _] = String.split(json_file, ".") - response = HTTPoison.get!("http://#{System.get_env("EX_AWS_ENDPOINT")}:9000/matches/#{key}.json", [], timeout: 5000) + + response = + HTTPoison.get!("http://#{System.get_env("EX_AWS_ENDPOINT")}:9000/matches/#{key}.json", [], + timeout: 5000 + ) %{"info" => %{"gameVersion" => gameVersion, "queueId" => queueId}} = Poison.decode!(response.body)