fix pattern match
All checks were successful
Build and Publish / build-release (push) Successful in 1m23s

This commit is contained in:
2026-04-21 15:13:20 -05:00
parent a5e3e1140e
commit dd2e25e86a

View File

@@ -30,9 +30,12 @@ defmodule PolicyService.Consumers.QuoteTaskConsumer do
def handle_info({:basic_deliver, payload, %{delivery_tag: tag}}, %{channel: ch} = state) do
with {:ok, event} <- Jason.decode(payload),
{:ok, _} <- dispatch(event) do
:ok <- dispatch(event) do
AMQP.Basic.ack(ch, tag)
else
{:ok, _} ->
AMQP.Basic.ack(ch, tag)
{:error, reason} ->
Logger.error("QuoteTaskConsumer failed: #{inspect(reason)}")
AMQP.Basic.nack(ch, tag, requeue: false)