Skip to content

Commit c978b61

Browse files
committed
Don't log when queue is unavailable
Fixes blockscout#1223 For large chains like ETH Mainnet, it is fairly common for the catchup fetcher to take a long time to calculate the missing block numbers and start the named Sequence used by `push_front(block)`. Since this is normal and not exceptional, `InvalidConsensus.Worker` shouldn't log this and retry silently.
1 parent f7b8912 commit c978b61

File tree

1 file changed

+4
-1
lines changed
  • apps/indexer/lib/indexer/block/invalid_consensus

1 file changed

+4
-1
lines changed

apps/indexer/lib/indexer/block/invalid_consensus/worker.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ defmodule Indexer.Block.InvalidConsensus.Worker do
7777
end
7878

7979
def handle_info({ref, {:error, reason}}, %{task_ref: ref, retry_interval: millis} = state) do
80-
Logger.error(fn -> inspect(reason) end)
80+
case reason do
81+
:queue_unavailable -> :ok
82+
_ -> Logger.error(fn -> inspect(reason) end)
83+
end
8184

8285
Process.demonitor(ref, [:flush])
8386
Process.send_after(self(), :push_front_blocks, millis)

0 commit comments

Comments
 (0)