2019-12-26 22:10:19 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-04-08 14:13:33 +05:30
|
|
|
class GroupExportWorker # rubocop:disable Scalability/IdempotentWorker
|
2019-12-26 22:10:19 +05:30
|
|
|
include ApplicationWorker
|
2021-10-27 15:23:28 +05:30
|
|
|
|
|
|
|
data_consistency :always
|
2019-12-26 22:10:19 +05:30
|
|
|
include ExceptionBacktrace
|
|
|
|
|
2020-03-13 15:44:24 +05:30
|
|
|
feature_category :importers
|
2020-06-23 00:09:42 +05:30
|
|
|
loggable_arguments 2
|
2021-01-03 14:25:43 +05:30
|
|
|
sidekiq_options retry: false, dead: false
|
2019-12-26 22:10:19 +05:30
|
|
|
|
|
|
|
def perform(current_user_id, group_id, params = {})
|
|
|
|
current_user = User.find(current_user_id)
|
2020-03-13 15:44:24 +05:30
|
|
|
group = Group.find(group_id)
|
2019-12-26 22:10:19 +05:30
|
|
|
|
|
|
|
::Groups::ImportExport::ExportService.new(group: group, user: current_user, params: params).execute
|
|
|
|
end
|
|
|
|
end
|