Welcome to mirror list, hosted at ThFree Co, Russian Federation.

issue_due_scheduler_worker.rb « workers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5902790728417cfb0e8f031ba75324f6157028fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

class IssueDueSchedulerWorker
  include ApplicationWorker
  include CronjobQueue # rubocop:disable Scalability/CronWorkerContext

  feature_category :issue_tracking

  # rubocop: disable CodeReuse/ActiveRecord
  def perform
    project_ids = Issue.opened.due_tomorrow.group(:project_id).pluck(:project_id).map { |id| [id] }

    MailScheduler::IssueDueWorker.bulk_perform_async(project_ids) # rubocop:disable Scalability/BulkPerformWithContext
  end
  # rubocop: enable CodeReuse/ActiveRecord
end