Add more logging to send_activity_recap_worker

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-05-11 09:47:18 +02:00
parent ab622cb424
commit c05243f839
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
2 changed files with 5 additions and 1 deletions

View File

@ -178,7 +178,7 @@ defmodule Mobilizon.Service.Notifier.Email do
@spec save_last_notification_time(User.t()) :: {:ok, Setting.t()} | {:error, Ecto.Changeset.t()}
defp save_last_notification_time(%User{id: user_id, email: email}) do
Logger.debug("Saving last notification time for user #{email}")
Logger.info("Saving last notification time for user #{email}")
attrs = %{user_id: user_id, last_notification_sent: DateTime.utc_now()}
case Users.get_setting(user_id) do

View File

@ -42,6 +42,10 @@ defmodule Mobilizon.Service.Workers.SendActivityRecapWorker do
%User{settings: %Setting{group_notifications: group_notifications}} =
user
} ->
Logger.info(
"Asking to send email notification #{group_notifications} to user #{user.email} for #{length(activities)} activities"
)
Email.send(user, activities, recap: group_notifications)
end)
end,