Skip to content

Commit 17292ad

Browse files
authored
Merge pull request blockscout#1224 from poanetwork/1223
Don't log when queue is unavailable in Indexer.Block.InvalidConsensus.Worker
2 parents f7b8912 + 6a0f625 commit 17292ad

File tree

2 files changed

+8
-2
lines changed
  • apps/indexer/lib/indexer

2 files changed

+8
-2
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)

apps/indexer/lib/indexer/token_transfer/uncataloged/worker.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ defmodule Indexer.TokenTransfer.Uncataloged.Worker do
7676
end
7777

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

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

0 commit comments

Comments
 (0)