diff --git a/apps/explorer/lib/explorer/application.ex b/apps/explorer/lib/explorer/application.ex index eac2fa7964..bf6dbe652d 100644 --- a/apps/explorer/lib/explorer/application.ex +++ b/apps/explorer/lib/explorer/application.ex @@ -27,7 +27,7 @@ defmodule Explorer.Application do [ Explorer.JSONRPC, Supervisor.child_spec({Task.Supervisor, name: Explorer.TaskSupervisor}, id: Explorer.TaskSupervisor), - Explorer.Indexer, + Explorer.Indexer.Supervisor, Explorer.Chain.Statistics.Server, Explorer.ExchangeRates, Explorer.Market.History.Cataloger diff --git a/apps/explorer/lib/explorer/indexer.ex b/apps/explorer/lib/explorer/indexer.ex index 1e44b5fa69..ff85029299 100644 --- a/apps/explorer/lib/explorer/indexer.ex +++ b/apps/explorer/lib/explorer/indexer.ex @@ -5,30 +5,6 @@ defmodule Explorer.Indexer do alias Explorer.Chain - @doc """ - Options passed to `child_spec` are passed to `Explorer.Indexer.Supervisor.start_link/1` - - iex> Explorer.Indexer.child_spec([option: :value]) - %{ - id: Explorer.Indexer, - restart: :permanent, - shutdown: 5000, - start: {Explorer.Indexer.Supervisor, :start_link, - [[option: :value]]}, - type: :supervisor - } - - """ - def child_spec(opts) do - %{ - id: __MODULE__, - start: {Explorer.Indexer.Supervisor, :start_link, [opts]}, - restart: :permanent, - shutdown: 5000, - type: :supervisor - } - end - @doc """ The maximum `t:Explorer.Chain.Block.t/0` `number` that was indexed diff --git a/apps/explorer/lib/explorer/indexer/supervisor.ex b/apps/explorer/lib/explorer/indexer/supervisor.ex index 854f54706a..b57e2b0e05 100644 --- a/apps/explorer/lib/explorer/indexer/supervisor.ex +++ b/apps/explorer/lib/explorer/indexer/supervisor.ex @@ -8,7 +8,7 @@ defmodule Explorer.Indexer.Supervisor do alias Explorer.Indexer.{AddressFetcher, BlockFetcher} def start_link(opts) do - Supervisor.start_link(__MODULE__, opts) + Supervisor.start_link(__MODULE__, opts, name: __MODULE__) end @impl Supervisor