|
|
|
@ -46,11 +46,10 @@ database_api_url = |
|
|
|
|
do: System.get_env("DATABASE_READ_ONLY_API_URL"), |
|
|
|
|
else: System.get_env("DATABASE_URL") |
|
|
|
|
|
|
|
|
|
# pool_size = |
|
|
|
|
# if System.get_env("DATABASE_READ_ONLY_API_URL"), |
|
|
|
|
# do: String.to_integer(System.get_env("POOL_SIZE", "40")), |
|
|
|
|
# else: String.to_integer(System.get_env("POOL_SIZE", "50")) |
|
|
|
|
pool_size = String.to_integer(System.get_env("POOL_SIZE", "30")) |
|
|
|
|
pool_size = |
|
|
|
|
if System.get_env("DATABASE_READ_ONLY_API_URL"), |
|
|
|
|
do: String.to_integer(System.get_env("POOL_SIZE", "30")), |
|
|
|
|
else: String.to_integer(System.get_env("POOL_SIZE", "40")) |
|
|
|
|
|
|
|
|
|
# Configure your database |
|
|
|
|
config :explorer, Explorer.Repo, |
|
|
|
@ -62,10 +61,7 @@ config :explorer, Explorer.Repo, |
|
|
|
|
database_api = if System.get_env("DATABASE_READ_ONLY_API_URL"), do: nil, else: database |
|
|
|
|
hostname_api = if System.get_env("DATABASE_READ_ONLY_API_URL"), do: nil, else: hostname |
|
|
|
|
|
|
|
|
|
pool_size_api = |
|
|
|
|
if System.get_env("DATABASE_READ_ONLY_API_URL"), |
|
|
|
|
do: String.to_integer(System.get_env("POOL_SIZE_API", "10")), |
|
|
|
|
else: String.to_integer(System.get_env("POOL_SIZE_API", "10")) |
|
|
|
|
pool_size_api = String.to_integer(System.get_env("POOL_SIZE_API", "10")) |
|
|
|
|
|
|
|
|
|
# Configure API database |
|
|
|
|
config :explorer, Explorer.Repo.Replica1, |
|
|
|
@ -76,10 +72,7 @@ config :explorer, Explorer.Repo.Replica1, |
|
|
|
|
|
|
|
|
|
database_account_url = System.get_env("ACCOUNT_DATABASE_URL") || System.get_env("DATABASE_URL") |
|
|
|
|
|
|
|
|
|
pool_size_account = |
|
|
|
|
if System.get_env("ACCOUNT_DATABASE_URL"), |
|
|
|
|
do: String.to_integer(System.get_env("ACCOUNT_POOL_SIZE", "10")), |
|
|
|
|
else: String.to_integer(System.get_env("ACCOUNT_POOL_SIZE", "10")) |
|
|
|
|
pool_size_account = String.to_integer(System.get_env("ACCOUNT_POOL_SIZE", "10")) |
|
|
|
|
|
|
|
|
|
database_account = if System.get_env("ACCOUNT_DATABASE_URL"), do: nil, else: database |
|
|
|
|
hostname_account = if System.get_env("ACCOUNT_DATABASE_URL"), do: nil, else: hostname |
|
|
|
|