2020-04-21 11:21:10 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class ExportCsvWorker # rubocop:disable Scalability/IdempotentWorker
|
|
|
|
include ApplicationWorker
|
|
|
|
|
2021-07-21 08:09:35 -04:00
|
|
|
data_consistency :always
|
|
|
|
|
2021-04-30 14:10:09 -04:00
|
|
|
sidekiq_options retry: 3
|
|
|
|
|
2021-10-27 11:13:41 -04:00
|
|
|
feature_category :team_planning
|
2020-04-21 11:21:10 -04:00
|
|
|
worker_resource_boundary :cpu
|
2020-06-12 08:08:56 -04:00
|
|
|
loggable_arguments 2
|
2020-04-21 11:21:10 -04:00
|
|
|
|
|
|
|
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)
|
|
|
|
|
2020-10-16 14:09:04 -04:00
|
|
|
IssuableExportCsvWorker.perform_async(:issue, @current_user.id, @project.id, params)
|
2020-04-21 11:21:10 -04:00
|
|
|
end
|
|
|
|
end
|