mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-12 16:14:58 +08:00
Merge pull request #6674 from G-Chubinidze/gc_SCI_9562_v2
Implement Task Due Date Reminder notification [SCI-9562]
This commit is contained in:
commit
7367fd4fba
2 changed files with 8 additions and 6 deletions
|
@ -1,11 +1,13 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class DueDateReminderJob < ApplicationJob
|
||||
def perform
|
||||
my_modules = MyModule.approaching_due_dates
|
||||
module MyModules
|
||||
class DueDateReminderJob < ApplicationJob
|
||||
def perform
|
||||
my_modules = MyModule.approaching_due_dates
|
||||
|
||||
my_modules.each do |task|
|
||||
TaskDueDateNotification.send_notifications({ my_module_id: task.id })
|
||||
my_modules.each do |task|
|
||||
TaskDueDateNotification.send_notifications({ my_module_id: task.id })
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -23,6 +23,6 @@ if ENV['ENABLE_FLUICS_SYNC'] == 'true'
|
|||
end
|
||||
|
||||
scheduler.every '1h' do
|
||||
DueDateReminderJob.perform_now
|
||||
MyModules::DueDateReminderJob.perform_now
|
||||
RepositoryItemDateReminderJob.perform_now
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue