forked from potsda.mn/mobilizon
Add more logging to send_activity_recap_worker
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
ab622cb424
commit
c05243f839
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue