scinote-web/app/jobs/my_modules/due_date_reminder_job.rb

14 lines
349 B
Ruby

# frozen_string_literal: true
module MyModules
class DueDateReminderJob < ApplicationJob
def perform
NewRelic::Agent.ignore_transaction
my_modules = MyModule.uncomplete.approaching_due_dates
my_modules.each do |task|
TaskDueDateNotification.send_notifications({ my_module_id: task.id })
end
end
end
end