DEV: Improve logging of errors in `Jobs::ProcessUserNotificationSchedules`
Gives us the actual error and backtrace to work with. Otherwise, the logging of the error is not useful at all.
This commit is contained in:
parent
4223541bc5
commit
0d8144b62b
|
@ -8,8 +8,8 @@ module Jobs
|
||||||
UserNotificationSchedule.enabled.includes(:user).each do |schedule|
|
UserNotificationSchedule.enabled.includes(:user).each do |schedule|
|
||||||
begin
|
begin
|
||||||
schedule.create_do_not_disturb_timings
|
schedule.create_do_not_disturb_timings
|
||||||
rescue
|
rescue => e
|
||||||
Rails.logger.warn("Failed to process user_notification_schedule with ID #{schedule.id}")
|
Discourse.warn_exception(e, message: "Failed to process user_notification_schedule with ID #{schedule.id}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue