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|
|
||||
begin
|
||||
schedule.create_do_not_disturb_timings
|
||||
rescue
|
||||
Rails.logger.warn("Failed to process user_notification_schedule with ID #{schedule.id}")
|
||||
rescue => e
|
||||
Discourse.warn_exception(e, message: "Failed to process user_notification_schedule with ID #{schedule.id}")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue