fix match classifier
This commit is contained in:
parent
2e56c7105b
commit
2a7d6a1688
@ -16,10 +16,16 @@ defmodule Scrapper.MatchClassifier do
|
|||||||
|> Scrapper.Parallel.peach(fn {match, index} ->
|
|> Scrapper.Parallel.peach(fn {match, index} ->
|
||||||
%{key: json_file} = match
|
%{key: json_file} = match
|
||||||
[key | _] = String.split(json_file, ".")
|
[key | _] = String.split(json_file, ".")
|
||||||
Logger.info("Match at #{index} of #{total_matches} is classified")
|
|
||||||
response = HTTPoison.get!("http://localhost:9000/matches/#{key}.json", [], timeout: 5000)
|
response = HTTPoison.get!("http://localhost:9000/matches/#{key}.json", [], timeout: 5000)
|
||||||
%{"info" => %{"gameVersion" => gameVersion}} = Poison.decode!(response.body)
|
|
||||||
Storage.MatchStorage.S3MatchStorage.store_match(key, response.body, "ranked", gameVersion)
|
%{"info" => %{"gameVersion" => gameVersion, "queueId" => queueId}} =
|
||||||
|
Poison.decode!(response.body)
|
||||||
|
|
||||||
|
if queueId == 420 do
|
||||||
|
Storage.MatchStorage.S3MatchStorage.store_match(key, response.body, "ranked", gameVersion)
|
||||||
|
Logger.info("Match at #{index} of #{total_matches} is classified")
|
||||||
|
end
|
||||||
|
|
||||||
match
|
match
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user