Class: ExportCsvWorker

Inherits:
Object
  • Object
show all
Includes:
ApplicationWorker
Defined in:
app/workers/export_csv_worker.rb

Overview

rubocop:disable Scalability/IdempotentWorker

Constant Summary

Constants included from ApplicationWorker

ApplicationWorker::LOGGING_EXTRA_KEY

Constants included from WorkerAttributes

WorkerAttributes::NAMESPACE_WEIGHTS, WorkerAttributes::VALID_RESOURCE_BOUNDARIES, WorkerAttributes::VALID_URGENCIES

Instance Method Summary collapse

Methods included from Gitlab::SidekiqVersioning::Worker

#job_version

Methods included from WorkerContext

#with_context

Instance Method Details

#perform(current_user_id, project_id, params) ⇒ Object


10
11
12
13
14
15
16
17
18
19
20
21
# File 'app/workers/export_csv_worker.rb', line 10

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