Skip to content

Commit

Permalink
Logging WIP 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ErinLMoore committed Jun 18, 2024
1 parent 8ef1725 commit 852bc57
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apps/alert_processor/lib/user_update_worker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ defmodule AlertProcessor.UserUpdateWorker do
{:ok, messages} = receive_messages()

for message <- messages do
Logger.info("USER_MESSAGE: #{inspect(message)}")

case update_user_record(message.user_update) do
:ok ->
# Delete the message from SQS once successfully processed
Expand Down Expand Up @@ -131,11 +133,10 @@ defmodule AlertProcessor.UserUpdateWorker do

@spec parse_message(map()) :: map()
defp parse_message(%{body: body, receipt_handle: receipt_handle}) do
body =
user_update =
body
|> Poison.decode!()
Logger.info("USER_UPDATE #{inspect(body)}")
user_update = body |> parse_user_update()
|> parse_user_update()

%{
user_update: user_update,
Expand Down

0 comments on commit 852bc57

Please sign in to comment.