Merge pull request #1224 from poanetwork/1223

Don't log when queue is unavailable in Indexer.Block.InvalidConsensus.Worker
sa-turn-off-invalidconsensus-checker
Luke Imhoff 6 years ago committed by GitHub
commit 17292ad89b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      apps/indexer/lib/indexer/block/invalid_consensus/worker.ex
  2. 5
      apps/indexer/lib/indexer/token_transfer/uncataloged/worker.ex

@ -77,7 +77,10 @@ defmodule Indexer.Block.InvalidConsensus.Worker do
end
def handle_info({ref, {:error, reason}}, %{task_ref: ref, retry_interval: millis} = state) do
Logger.error(fn -> inspect(reason) end)
case reason do
:queue_unavailable -> :ok
_ -> Logger.error(fn -> inspect(reason) end)
end
Process.demonitor(ref, [:flush])
Process.send_after(self(), :push_front_blocks, millis)

@ -76,7 +76,10 @@ defmodule Indexer.TokenTransfer.Uncataloged.Worker do
end
def handle_info({ref, {:error, reason}}, %{task_ref: ref, retry_interval: millis} = state) do
Logger.error(fn -> inspect(reason) end)
case reason do
:queue_unavailable -> :ok
_ -> Logger.error(fn -> inspect(reason) end)
end
Process.demonitor(ref, [:flush])
Process.send_after(self(), :push_front_blocks, millis)

Loading…
Cancel
Save