Class: BulkImports::FileExportService

Inherits:
Object
  • Object
show all
Includes:
Gitlab::ImportExport::CommandLineUtil
Defined in:
app/services/bulk_imports/file_export_service.rb

Constant Summary

Constants included from Gitlab::ImportExport::CommandLineUtil

Gitlab::ImportExport::CommandLineUtil::DEFAULT_DIR_MODE, Gitlab::ImportExport::CommandLineUtil::FileOversizedError, Gitlab::ImportExport::CommandLineUtil::UNTAR_MASK

Instance Method Summary collapse

Methods included from Gitlab::ImportExport::CommandLineUtil

#gunzip, #gzip, #gzip_with_options, #mkdir_p, #tar_cf, #tar_czf, #untar_xf, #untar_zxf

Constructor Details

#initialize(portable, export_path, relation) ⇒ FileExportService

Returns a new instance of FileExportService.


7
8
9
10
11
# File 'app/services/bulk_imports/file_export_service.rb', line 7

def initialize(portable, export_path, relation)
  @portable = portable
  @export_path = export_path
  @relation = relation
end

Instance Method Details

#executeObject


13
14
15
16
17
# File 'app/services/bulk_imports/file_export_service.rb', line 13

def execute
  export_service.execute

  archive_exported_data
end

#exported_filenameObject


19
20
21
# File 'app/services/bulk_imports/file_export_service.rb', line 19

def exported_filename
  "#{relation}.tar"
end