update config for storage

This commit is contained in:
Álvaro 2024-05-12 01:22:45 +02:00
parent 3239f09cbd
commit f8dbf17c73
4 changed files with 21 additions and 5 deletions

View File

@ -16,7 +16,7 @@ defmodule Scrapper.MatchClassifier do
|> Scrapper.Parallel.peach(fn {match, index} ->
%{key: json_file} = match
[key | _] = String.split(json_file, ".")
response = HTTPoison.get!("http://localhost: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)

View File

@ -8,10 +8,12 @@ import Config
# secret_access_key: System.get_env("EX_AWS_SECRET_KEY")
config :ex_aws,
access_key_id: "3zwMWl4RPCs8CHzhKmIX",
secret_access_key: "79B6LmryjJElkrIiHgDcfIxSpmvrLdVy75MyAJC2",
# "EX_AWS_SECRET_KEY",
# EX_AWS_ACCESS_KEY
access_key_id: System.get_env("EX_AWS_ACCESS_KEY"),
secret_access_key: System.get_env("EX_AWS_SECRET_KEY"),
s3: [
scheme: "http://",
host: "localhost",
port: "9000"
host: System.get_env("EX_AWS_ENDPOINT"),
port: System.get_env("EX_AWS_PORT")
]

View File

@ -0,0 +1,12 @@
import Config
config :ex_aws,
# "EX_AWS_SECRET_KEY",
# EX_AWS_ACCESS_KEY
access_key_id: System.get_env("EX_AWS_ACCESS_KEY"),
secret_access_key: System.get_env("EX_AWS_SECRET_KEY"),
s3: [
scheme: "http://",
host: System.get_env("EX_AWS_ENDPOINT"),
port: System.get_env("EX_AWS_PORT")
]

View File

@ -1 +1,3 @@
import Config
import_config("libs/ex_aws_prod.exs")