Class: Jobs::ProcessUserNotificationSchedules
- Defined in:
- app/jobs/scheduled/process_user_notification_schedules.rb
Instance Method Summary collapse
Methods inherited from Scheduled
Methods inherited from Base
acquire_cluster_concurrency_lock!, clear_cluster_concurrency_lock!, cluster_concurrency, cluster_concurrency_redis_key, delayed_perform, #error_context, get_cluster_concurrency, #last_db_duration, #log, #perform, #perform_immediately
Instance Method Details
#execute(args) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/jobs/scheduled/process_user_notification_schedules.rb', line 7 def execute(args) UserNotificationSchedule .enabled .includes(:user) .each do |schedule| begin schedule.create_do_not_disturb_timings rescue => e Discourse.warn_exception( e, message: "Failed to process user_notification_schedule with ID #{schedule.id}", ) end end end |