diff options
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/all_queues.yml | 1 | ||||
-rw-r--r-- | app/workers/group_export_worker.rb | 4 | ||||
-rw-r--r-- | app/workers/group_import_worker.rb | 15 |
3 files changed, 18 insertions, 2 deletions
diff --git a/app/workers/all_queues.yml b/app/workers/all_queues.yml index 87feecf4bbb..1e7b5a1cf65 100644 --- a/app/workers/all_queues.yml +++ b/app/workers/all_queues.yml @@ -137,6 +137,7 @@ - gitlab_shell - group_destroy - group_export +- group_import - import_issues_csv - invalid_gpg_signature_update - irker diff --git a/app/workers/group_export_worker.rb b/app/workers/group_export_worker.rb index 51dbdc95661..a2d34e8c8bf 100644 --- a/app/workers/group_export_worker.rb +++ b/app/workers/group_export_worker.rb @@ -4,11 +4,11 @@ class GroupExportWorker include ApplicationWorker include ExceptionBacktrace - feature_category :source_code_management + feature_category :importers def perform(current_user_id, group_id, params = {}) current_user = User.find(current_user_id) - group = Group.find(group_id) + group = Group.find(group_id) ::Groups::ImportExport::ExportService.new(group: group, user: current_user, params: params).execute end diff --git a/app/workers/group_import_worker.rb b/app/workers/group_import_worker.rb new file mode 100644 index 00000000000..f283eab5814 --- /dev/null +++ b/app/workers/group_import_worker.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class GroupImportWorker + include ApplicationWorker + include ExceptionBacktrace + + feature_category :importers + + def perform(user_id, group_id) + current_user = User.find(user_id) + group = Group.find(group_id) + + ::Groups::ImportExport::ImportService.new(group: group, user: current_user).execute + end +end |