debian-mirror-gitlab/app/workers/issue_due_scheduler_worker.rb

17 lines
427 B
Ruby
Raw Normal View History

2018-11-08 19:23:39 +05:30
# frozen_string_literal: true
2018-10-15 14:42:47 +05:30
class IssueDueSchedulerWorker
include ApplicationWorker
include CronjobQueue
2019-12-21 20:55:43 +05:30
feature_category :issue_tracking
2018-12-05 23:21:45 +05:30
# rubocop: disable CodeReuse/ActiveRecord
2018-10-15 14:42:47 +05:30
def perform
project_ids = Issue.opened.due_tomorrow.group(:project_id).pluck(:project_id).map { |id| [id] }
MailScheduler::IssueDueWorker.bulk_perform_async(project_ids)
end
2018-12-05 23:21:45 +05:30
# rubocop: enable CodeReuse/ActiveRecord
2018-10-15 14:42:47 +05:30
end