use seconds

pull/2191/head
Ayrat Badykov 6 years ago
parent 04e484742a
commit 857ac30058
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 2
      apps/indexer/config/config.exs
  2. 2
      apps/indexer/lib/indexer/fetcher/token_updater.ex
  3. 2
      apps/indexer/lib/indexer/supervisor.ex

@ -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"

@ -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

@ -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

Loading…
Cancel
Save