Class: Groups::ImportExport::ExportService
- Inherits:
-
Object
- Object
- Groups::ImportExport::ExportService
- Defined in:
- app/services/groups/import_export/export_service.rb
Instance Method Summary collapse
- #async_execute ⇒ Object
- #execute ⇒ Object
-
#initialize(group:, user:, params: {}) ⇒ ExportService
constructor
A new instance of ExportService.
Constructor Details
#initialize(group:, user:, params: {}) ⇒ ExportService
Returns a new instance of ExportService.
6 7 8 9 10 11 12 |
# File 'app/services/groups/import_export/export_service.rb', line 6 def initialize(group:, user:, params: {}) @group = group @current_user = user @params = params @shared = @params[:shared] || Gitlab::ImportExport::Shared.new(@group) @logger = Gitlab::Export::Logger.build end |
Instance Method Details
#async_execute ⇒ Object
14 15 16 |
# File 'app/services/groups/import_export/export_service.rb', line 14 def async_execute GroupExportWorker.perform_async(current_user.id, group.id, params) end |
#execute ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'app/services/groups/import_export/export_service.rb', line 18 def execute remove_existing_export! if group.export_file_exists? save! ensure remove_archive_tmp_dir end |