summaryrefslogtreecommitdiff
path: root/app/workers/group_export_worker.rb
blob: e22b691d35ece127435769cfaa0a1fc12267eaf3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

class GroupExportWorker # rubocop:disable Scalability/IdempotentWorker
  include ApplicationWorker
  include ExceptionBacktrace

  feature_category :importers
  loggable_arguments 2
  sidekiq_options retry: false

  def perform(current_user_id, group_id, params = {})
    current_user = User.find(current_user_id)
    group = Group.find(group_id)

    ::Groups::ImportExport::ExportService.new(group: group, user: current_user, params: params).execute
  end
end