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

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

class ExportCsvWorker # rubocop:disable Scalability/IdempotentWorker
  include ApplicationWorker

  feature_category :issue_tracking
  worker_resource_boundary :cpu

  def perform(current_user_id, project_id, params)
    @current_user = User.find(current_user_id)
    @project = Project.find(project_id)

    params.symbolize_keys!
    params[:project_id] = project_id
    params.delete(:sort)

    issues = IssuesFinder.new(@current_user, params).execute

    Issues::ExportCsvService.new(issues, @project).email(@current_user)
  end
end