2019-11-11 16:06:20 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-02-19 13:09:10 -05:00
|
|
|
class GroupExportWorker # rubocop:disable Scalability/IdempotentWorker
|
2019-11-11 16:06:20 -05:00
|
|
|
include ApplicationWorker
|
|
|
|
include ExceptionBacktrace
|
|
|
|
|
2020-01-28 04:09:06 -05:00
|
|
|
feature_category :importers
|
2020-06-12 08:08:56 -04:00
|
|
|
loggable_arguments 2
|
2020-07-01 11:08:45 -04:00
|
|
|
sidekiq_options retry: false
|
2019-11-11 16:06:20 -05:00
|
|
|
|
|
|
|
def perform(current_user_id, group_id, params = {})
|
|
|
|
current_user = User.find(current_user_id)
|
2020-01-28 04:09:06 -05:00
|
|
|
group = Group.find(group_id)
|
2019-11-11 16:06:20 -05:00
|
|
|
|
|
|
|
::Groups::ImportExport::ExportService.new(group: group, user: current_user, params: params).execute
|
|
|
|
end
|
|
|
|
end
|