Skip to content

Commit

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

for message <- messages do
Logger.warn("User Update Worker: #{inspect(message)}")

case update_user_record(message.user_update) do
:ok ->
# Delete the message from SQS once successfully processed
Expand Down
9 changes: 8 additions & 1 deletion apps/concierge_site/lib/controllers/auth_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ defmodule ConciergeSite.AuthController do
defp get_or_create_user(%{id: id, mbta_uuid: mbta_uuid} = id_map, email, phone_number, role) do
# This checks both the normal id from Keycloak, and the legacy mbta_uuid. We should get either 0 or 1 users back.
user_list = User.get_by_alternate_id(id_map)
Logger.info("id: #{id}, mbta_uuid: #{mbta_uuid}")
Logger.info("User list: #{inspect(user_list)}")

case length(user_list) do
0 ->
Expand Down Expand Up @@ -107,7 +109,12 @@ defmodule ConciergeSite.AuthController do
# able to use them to send notifications), but in cases where the user just
# changed one of these fields in Keycloak, we might not have had time receive
# that message yet, so the values in the token are more authoritative.
@spec use_props_from_token(User.t() | :find_user_error, String.t(), String.t() | nil, String.t()) ::
@spec use_props_from_token(
User.t() | :find_user_error,
String.t(),
String.t() | nil,
String.t()
) ::
User.t() | nil
defp use_props_from_token(:find_user_error, _, _, _), do: nil

Expand Down

0 comments on commit d0317a0

Please sign in to comment.