diff --git a/apps/indexer/config/config.exs b/apps/indexer/config/config.exs index 7c17ee1952..c63d91a51d 100644 --- a/apps/indexer/config/config.exs +++ b/apps/indexer/config/config.exs @@ -31,7 +31,7 @@ block_transformer = config :indexer, block_transformer: block_transformer, ecto_repos: [Explorer.Repo], - metadata_updater_hours_interval: String.to_integer(System.get_env("TOKEN_METADATA_UPDATE_INTERVAL") || "#{2 * 24}"), + metadata_updater_seconds_interval: String.to_integer(System.get_env("TOKEN_METADATA_UPDATE_INTERVAL") || "#{2 * 24 * 60 * 60}"), # bytes memory_limit: 1 <<< 30, first_block: System.get_env("FIRST_BLOCK") || "0" diff --git a/apps/indexer/lib/indexer/fetcher/token_updater.ex b/apps/indexer/lib/indexer/fetcher/token_updater.ex index ddd055c9d2..5e8ac789e3 100644 --- a/apps/indexer/lib/indexer/fetcher/token_updater.ex +++ b/apps/indexer/lib/indexer/fetcher/token_updater.ex @@ -29,7 +29,7 @@ defmodule Indexer.Fetcher.TokenUpdater do |> Enum.reverse() |> update_metadata() - Process.send_after(self(), :update_tokens, :timer.hours(state.update_interval)) + Process.send_after(self(), :update_tokens, :timer.seconds(state.update_interval)) {:noreply, state} end diff --git a/apps/indexer/lib/indexer/supervisor.ex b/apps/indexer/lib/indexer/supervisor.ex index 3b8a558d07..00fba8d428 100644 --- a/apps/indexer/lib/indexer/supervisor.ex +++ b/apps/indexer/lib/indexer/supervisor.ex @@ -72,7 +72,7 @@ defmodule Indexer.Supervisor do subscribe_named_arguments: subscribe_named_arguments } = named_arguments - metadata_updater_inverval = Application.get_env(:indexer, :metadata_updater_hours_interval) + metadata_updater_inverval = Application.get_env(:indexer, :metadata_updater_seconds_interval) block_fetcher = named_arguments