summaryrefslogtreecommitdiff
path: root/lib/gitlab/import_export/saver.rb
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2018-08-29 15:41:56 +0200
committerJames Lopez <james@jameslopez.es>2018-09-06 16:52:42 +0200
commita2aa505805478540b3150b2f9093c8658e18597d (patch)
tree7f080afe99e546f743e14c8efa5c6a30c2527554 /lib/gitlab/import_export/saver.rb
parenta2ea32dd44cc4a104e404325c73a77151913a946 (diff)
downloadgitlab-ce-a2aa505805478540b3150b2f9093c8658e18597d.tar.gz
Refactor code to remove object storage flag from Import/Export
Updated docs, refactor import/export code Fix AvatarUploader path issue Fix project export upload webhook error
Diffstat (limited to 'lib/gitlab/import_export/saver.rb')
-rw-r--r--lib/gitlab/import_export/saver.rb14
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/gitlab/import_export/saver.rb b/lib/gitlab/import_export/saver.rb
index 3cd153a4fd2..a66f32f91d2 100644
--- a/lib/gitlab/import_export/saver.rb
+++ b/lib/gitlab/import_export/saver.rb
@@ -18,7 +18,7 @@ module Gitlab
Rails.logger.info("Saved project export #{archive_file}")
- save_on_object_storage if use_object_storage?
+ save_on_object_storage
else
@shared.error(Gitlab::ImportExport::Error.new(error_message))
false
@@ -27,10 +27,8 @@ module Gitlab
@shared.error(e)
false
ensure
- if use_object_storage?
- remove_archive
- remove_export_path
- end
+ remove_archive
+ remove_export_path
end
private
@@ -59,12 +57,8 @@ module Gitlab
upload.save!
end
- def use_object_storage?
- Gitlab::ImportExport.object_storage?
- end
-
def error_message
- "Unable to save #{archive_file} into #{@shared.export_path}. Object storage enabled: #{use_object_storage?}"
+ "Unable to save #{archive_file} into #{@shared.export_path}."
end
end
end