Rollback changes for Explorer.Repo.Replica1

pull/8685/head
Viktor Baranov 1 year ago
parent c18b929b9e
commit 38e4aa93da
  1. 11
      apps/explorer/lib/explorer/application.ex

@ -46,6 +46,7 @@ defmodule Explorer.Application do
# Children to start in all environments
base_children = [
Explorer.Repo,
Explorer.Repo.Replica1,
Explorer.Vault,
Supervisor.child_spec({SpandexDatadog.ApiServer, datadog_opts()}, id: SpandexDatadog.ApiServer),
Supervisor.child_spec({Task.Supervisor, name: Explorer.HistoryTaskSupervisor}, id: Explorer.HistoryTaskSupervisor),
@ -128,7 +129,7 @@ defmodule Explorer.Application do
]
|> List.flatten()
repos_by_chain_type() ++ account_repo() ++ replica_repo() ++ configurable_children_set
repos_by_chain_type() ++ account_repo() ++ configurable_children_set
end
defp repos_by_chain_type do
@ -147,14 +148,6 @@ defmodule Explorer.Application do
end
end
defp replica_repo do
if System.get_env("DATABASE_READ_ONLY_API_URL") do
[Explorer.Repo.Replica1]
else
[]
end
end
defp should_start?(process) do
Application.get_env(:explorer, process, [])[:enabled] == true
end

Loading…
Cancel
Save