|
|
@ -17,7 +17,15 @@ config :explorer, |
|
|
|
if(System.get_env("UNCLES_IN_AVERAGE_BLOCK_TIME") == "false", do: false, else: true), |
|
|
|
if(System.get_env("UNCLES_IN_AVERAGE_BLOCK_TIME") == "false", do: false, else: true), |
|
|
|
healthy_blocks_period: System.get_env("HEALTHY_BLOCKS_PERIOD") || :timer.minutes(5) |
|
|
|
healthy_blocks_period: System.get_env("HEALTHY_BLOCKS_PERIOD") || :timer.minutes(5) |
|
|
|
|
|
|
|
|
|
|
|
config :explorer, Explorer.Counters.AverageBlockTime, enabled: true |
|
|
|
average_block_period = |
|
|
|
|
|
|
|
case Integer.parse(System.get_env("AVERAGE_BLOCK_CACHE_PERIOD", "")) do |
|
|
|
|
|
|
|
{secs, ""} -> :timer.seconds(secs) |
|
|
|
|
|
|
|
_ -> :timer.minutes(30) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
config :explorer, Explorer.Counters.AverageBlockTime, |
|
|
|
|
|
|
|
enabled: true, |
|
|
|
|
|
|
|
period: average_block_period |
|
|
|
|
|
|
|
|
|
|
|
config :explorer, Explorer.Chain.Cache.BlockNumber, enabled: true |
|
|
|
config :explorer, Explorer.Chain.Cache.BlockNumber, enabled: true |
|
|
|
|
|
|
|
|
|
|
@ -106,6 +114,14 @@ config :spandex_ecto, SpandexEcto.EctoLogger, |
|
|
|
tracer: Explorer.Tracer, |
|
|
|
tracer: Explorer.Tracer, |
|
|
|
otp_app: :explorer |
|
|
|
otp_app: :explorer |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
market_history_cache_period = |
|
|
|
|
|
|
|
case Integer.parse(System.get_env("MARKET_HISTORY_CACHE_PERIOD", "")) do |
|
|
|
|
|
|
|
{secs, ""} -> :timer.seconds(secs) |
|
|
|
|
|
|
|
_ -> :timer.hours(6) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
config :explorer, Explorer.Market.MarketHistoryCache, period: market_history_cache_period |
|
|
|
|
|
|
|
|
|
|
|
# Import environment specific config. This must remain at the bottom |
|
|
|
# Import environment specific config. This must remain at the bottom |
|
|
|
# of this file so it overrides the configuration defined above. |
|
|
|
# of this file so it overrides the configuration defined above. |
|
|
|
import_config "#{Mix.env()}.exs" |
|
|
|
import_config "#{Mix.env()}.exs" |
|
|
|