refactor buyer and insured and add more policy types
All checks were successful
Build and Publish / build-release (push) Successful in 1m38s
All checks were successful
Build and Publish / build-release (push) Successful in 1m38s
This commit is contained in:
@@ -42,6 +42,10 @@ defmodule PolicyService.Consumers.QuoteTaskConsumer do
|
||||
{:noreply, state}
|
||||
end
|
||||
|
||||
def handle_info({:basic_consume_ok, _}, state), do: {:noreply, state}
|
||||
def handle_info({:basic_cancel, _}, state), do: {:stop, :normal, state}
|
||||
def handle_info({:basic_cancel_ok, _}, state), do: {:noreply, state}
|
||||
|
||||
defp process(payload) do
|
||||
with {:ok, event} <- Jason.decode(payload),
|
||||
:ok <- dispatch(event) do
|
||||
@@ -49,10 +53,6 @@ defmodule PolicyService.Consumers.QuoteTaskConsumer do
|
||||
end
|
||||
end
|
||||
|
||||
def handle_info({:basic_consume_ok, _}, state), do: {:noreply, state}
|
||||
def handle_info({:basic_cancel, _}, state), do: {:stop, :normal, state}
|
||||
def handle_info({:basic_cancel_ok, _}, state), do: {:noreply, state}
|
||||
|
||||
defp dispatch(%{
|
||||
"application_id" => %{
|
||||
"org_id" => org_id,
|
||||
|
||||
Reference in New Issue
Block a user