From 2b6f7eff784c2520731b1cf451fc044e3ffb862e Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 20 Aug 2019 11:06:40 +0300 Subject: [PATCH] do not start genesis data fetching periodically From this point genesis data fetching will start and will be retried on a task failure. Also, this PR disables genesis data fetcher process by default because most our users won't know that they should set chain spec for it. --- apps/explorer/config/config.exs | 2 +- apps/explorer/lib/explorer/chain_spec/genesis_data.ex | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/explorer/config/config.exs b/apps/explorer/config/config.exs index 95c80ba445..93298073e0 100644 --- a/apps/explorer/config/config.exs +++ b/apps/explorer/config/config.exs @@ -27,7 +27,7 @@ config :explorer, Explorer.Counters.AverageBlockTime, enabled: true, period: average_block_period -config :explorer, Explorer.ChainSpec.GenesisData, enabled: true, chain_spec_path: System.get_env("CHAIN_SPEC_PATH") +config :explorer, Explorer.ChainSpec.GenesisData, enabled: false, chain_spec_path: System.get_env("CHAIN_SPEC_PATH") config :explorer, Explorer.Chain.Cache.BlockNumber, enabled: true diff --git a/apps/explorer/lib/explorer/chain_spec/genesis_data.ex b/apps/explorer/lib/explorer/chain_spec/genesis_data.ex index a156aae6d7..690be2eb19 100644 --- a/apps/explorer/lib/explorer/chain_spec/genesis_data.ex +++ b/apps/explorer/lib/explorer/chain_spec/genesis_data.ex @@ -18,7 +18,6 @@ defmodule Explorer.ChainSpec.GenesisData do @impl GenServer def init(_) do - :timer.send_interval(@interval, :import) Process.send_after(self(), :import, @interval) {:ok, %{}}