2018-06-27 03:23:28 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-03-30 09:05:20 -04:00
|
|
|
class IssueDueSchedulerWorker
|
|
|
|
include ApplicationWorker
|
|
|
|
include CronjobQueue
|
|
|
|
|
2018-08-27 11:31:01 -04:00
|
|
|
# rubocop: disable CodeReuse/ActiveRecord
|
2018-03-30 09:05:20 -04:00
|
|
|
def perform
|
2018-04-17 07:44:45 -04:00
|
|
|
project_ids = Issue.opened.due_tomorrow.group(:project_id).pluck(:project_id).map { |id| [id] }
|
|
|
|
|
|
|
|
MailScheduler::IssueDueWorker.bulk_perform_async(project_ids)
|
2018-03-30 09:05:20 -04:00
|
|
|
end
|
2018-08-27 11:31:01 -04:00
|
|
|
# rubocop: enable CodeReuse/ActiveRecord
|
2018-03-30 09:05:20 -04:00
|
|
|
end
|