fix process init

pull/2499/head
Ayrat Badykov 5 years ago
parent cfaca5726e
commit 0602ecb51a
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 4
      apps/explorer/lib/explorer/chain_spec/genesis_data.ex

@ -15,7 +15,7 @@ defmodule Explorer.ChainSpec.GenesisData do
def init(_) do def init(_) do
:timer.send_interval(@interval, :import) :timer.send_interval(@interval, :import)
%{} {:ok, %{}}
end end
# Callback for errored fetch # Callback for errored fetch
@ -49,7 +49,7 @@ defmodule Explorer.ChainSpec.GenesisData do
{:noreply, state} {:noreply, state}
end end
defp fetch_genesis_data do def fetch_genesis_data do
if Application.get_env(:explorer, __MODULE__)[:chain_spec_path] do if Application.get_env(:explorer, __MODULE__)[:chain_spec_path] do
Task.Supervisor.async_nolink(Explorer.GenesisDataTaskSupervisor, fn -> Task.Supervisor.async_nolink(Explorer.GenesisDataTaskSupervisor, fn ->
chain_spec = Application.get_env(:explorer, __MODULE__)[:chain_spec_path] |> File.read!() |> Jason.decode!() chain_spec = Application.get_env(:explorer, __MODULE__)[:chain_spec_path] |> File.read!() |> Jason.decode!()

Loading…
Cancel
Save