diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-09 15:09:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-09 15:09:24 +0300 |
commit | a9ced7da447785c57477b3d8dbccc73a78cface1 (patch) | |
tree | 5179d27ab9d801748ee4ed1c64c985974e799812 /app/services/groups | |
parent | ad0265eead72a624ce7a020847db4f0f0c877e57 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/groups')
-rw-r--r-- | app/services/groups/import_export/export_service.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/services/groups/import_export/export_service.rb b/app/services/groups/import_export/export_service.rb index 0bf54844430..86e2eeda21f 100644 --- a/app/services/groups/import_export/export_service.rb +++ b/app/services/groups/import_export/export_service.rb @@ -10,9 +10,15 @@ module Groups @shared = @params[:shared] || Gitlab::ImportExport::Shared.new(@group) end + def async_execute + GroupExportWorker.perform_async(@current_user.id, @group.id, @params) + end + def execute validate_user_permissions + remove_existing_export! if @group.export_file_exists? + save! ensure cleanup @@ -30,6 +36,13 @@ module Groups end end + def remove_existing_export! + import_export_upload = @group.import_export_upload + + import_export_upload.remove_export_file! + import_export_upload.save + end + def save! if savers.all?(&:save) notify_success |