Merge pull request #6674 from G-Chubinidze/gc_SCI_9562_v2

Implement Task Due Date Reminder notification [SCI-9562]
This commit is contained in:
aignatov-bio 2023-11-21 12:15:04 +01:00 committed by GitHub
commit 7367fd4fba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View file

@ -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

View file

@ -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