DISABLE_BRIDGE_MARKET_CAP_UPDATER env var

pull/3315/head
Victor Baranov 4 years ago
parent 8bc87ee102
commit 5c653b86dd
  1. 1
      CHANGELOG.md
  2. 2
      apps/explorer/config/config.exs
  3. 2
      apps/explorer/lib/explorer/counters/bridge.ex

@ -28,6 +28,7 @@
- [#3256](https://github.com/poanetwork/blockscout/pull/3256) - Fix for invisible validator address at block page and wrong alert text color at xDai - [#3256](https://github.com/poanetwork/blockscout/pull/3256) - Fix for invisible validator address at block page and wrong alert text color at xDai
### Chore ### Chore
- [#3315](https://github.com/poanetwork/blockscout/pull/3315) - Environment variable to disable Bridge market cap updater
- [#3308](https://github.com/poanetwork/blockscout/pull/3308) - Fixate latest stable release of Elixir, Node, Postgres - [#3308](https://github.com/poanetwork/blockscout/pull/3308) - Fixate latest stable release of Elixir, Node, Postgres
- [#3297](https://github.com/poanetwork/blockscout/pull/3297) - Actualize names of default chains - [#3297](https://github.com/poanetwork/blockscout/pull/3297) - Actualize names of default chains
- [#3285](https://github.com/poanetwork/blockscout/pull/3285) - Switch to RPC endpoint polling if ETHEREUM_JSONRPC_WS_URL is an empty string - [#3285](https://github.com/poanetwork/blockscout/pull/3285) - Switch to RPC endpoint polling if ETHEREUM_JSONRPC_WS_URL is an empty string

@ -98,7 +98,7 @@ bridge_market_cap_update_interval =
config :explorer, Explorer.Counters.Bridge, config :explorer, Explorer.Counters.Bridge,
enabled: if(System.get_env("SUPPLY_MODULE") === "TokenBridge", do: true, else: false), enabled: if(System.get_env("SUPPLY_MODULE") === "TokenBridge", do: true, else: false),
enable_consolidation: true, enable_consolidation: System.get_env("DISABLE_BRIDGE_MARKET_CAP_UPDATER") !== "true",
update_interval_in_seconds: bridge_market_cap_update_interval || 30 * 60 update_interval_in_seconds: bridge_market_cap_update_interval || 30 * 60
config :explorer, Explorer.ExchangeRates, enabled: System.get_env("DISABLE_EXCHANGE_RATES") != "true", store: :ets config :explorer, Explorer.ExchangeRates, enabled: System.get_env("DISABLE_EXCHANGE_RATES") != "true", store: :ets

@ -134,6 +134,7 @@ defmodule Explorer.Counters.Bridge do
end end
defp update_total_supply_from_token_bridge_cache do defp update_total_supply_from_token_bridge_cache do
create_bridges_table()
current_total_supply_from_token_bridge = TokenBridge.get_current_total_supply_from_token_bridge() current_total_supply_from_token_bridge = TokenBridge.get_current_total_supply_from_token_bridge()
:ets.insert( :ets.insert(
@ -145,6 +146,7 @@ defmodule Explorer.Counters.Bridge do
end end
defp update_total_omni_bridge_market_cap_cache do defp update_total_omni_bridge_market_cap_cache do
create_bridges_table()
current_total_supply_from_omni_bridge = TokenBridge.get_current_market_cap_from_omni_bridge() current_total_supply_from_omni_bridge = TokenBridge.get_current_market_cap_from_omni_bridge()
:ets.insert( :ets.insert(

Loading…
Cancel
Save