pull/1634/head
Ayrat Badykov 6 years ago
parent 6360ecf799
commit 6727a8bd59
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 3
      apps/explorer/lib/explorer/application.ex
  2. 6
      apps/explorer/lib/explorer/chain/transaction_count_cache.ex

@ -6,9 +6,8 @@ defmodule Explorer.Application do
use Application use Application
alias Explorer.Admin alias Explorer.Admin
alias Explorer.Chain.BlockNumberCache alias Explorer.Chain.{BlockNumberCache, TransactionCountCache}
alias Explorer.Repo.PrometheusLogger alias Explorer.Repo.PrometheusLogger
alias Explorer.Chain.TransactionCountCache
@impl Application @impl Application
def start(_type, _args) do def start(_type, _args) do

@ -84,8 +84,12 @@ defmodule Explorer.Chain.TransactionCountCache do
{:noreply, {{cache_period, default_value, name}, nil}} {:noreply, {{cache_period, default_value, name}, nil}}
end end
# sobelow_skip ["DOS"]
defp table_name(name) do defp table_name(name) do
name |> Atom.to_string() |> Macro.underscore() |> String.to_atom() name
|> Atom.to_string()
|> Macro.underscore()
|> String.to_atom()
end end
def async_update_cache(name) do def async_update_cache(name) do

Loading…
Cancel
Save