mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 01:35:34 +08:00
Fix due date reminder spam for locked tasks [SCI-9885]
This commit is contained in:
parent
b38fe27e63
commit
788f01aeae
2 changed files with 2 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
||||||
module MyModules
|
module MyModules
|
||||||
class DueDateReminderJob < ApplicationJob
|
class DueDateReminderJob < ApplicationJob
|
||||||
def perform
|
def perform
|
||||||
my_modules = MyModule.approaching_due_dates
|
my_modules = MyModule.uncomplete.approaching_due_dates
|
||||||
|
|
||||||
my_modules.each do |task|
|
my_modules.each do |task|
|
||||||
TaskDueDateNotification.send_notifications({ my_module_id: task.id })
|
TaskDueDateNotification.send_notifications({ my_module_id: task.id })
|
||||||
|
|
|
@ -17,6 +17,6 @@ class TaskDueDateNotification < BaseNotification
|
||||||
end
|
end
|
||||||
|
|
||||||
after_deliver do
|
after_deliver do
|
||||||
MyModule.find(params[:my_module_id]).update(due_date_notification_sent: true)
|
MyModule.find(params[:my_module_id]).update_column(:due_date_notification_sent, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue