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:
@@ -41,6 +41,10 @@ defmodule PolicyService.Consumers.SolicitationTaskConsumer 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
|
||||
@@ -48,17 +52,13 @@ defmodule PolicyService.Consumers.SolicitationTaskConsumer 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,
|
||||
"policy_type" => policy_type,
|
||||
"application_id" => app_id
|
||||
},
|
||||
"task_info" => task_info,
|
||||
"task_info" => _task_info,
|
||||
"submission" => submission
|
||||
}) do
|
||||
cmd =
|
||||
|
||||
Reference in New Issue
Block a user