Refresh the chain statistics only after fetching

pull/3/head
Doc Ritezel 7 years ago
parent 081e9ecf08
commit d537280366
  1. 2
      lib/explorer/servers/chain_statistics.ex

@ -27,8 +27,8 @@ defmodule Explorer.Servers.ChainStatistics do
def refresh(interval), do: Process.send_after(self(), :refresh, interval)
def handle_info(:refresh, _) do
refresh()
chain = Chain.fetch()
refresh()
{:noreply, chain}
end
def handle_info(_, tasks), do: {:noreply, tasks}

Loading…
Cancel
Save