diff options
author | James Lopez <james@jameslopez.es> | 2018-09-07 14:43:51 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2018-09-07 14:43:51 +0200 |
commit | f1277fbf0bbe8de330d5d80fdfe411a0c8571022 (patch) | |
tree | 8aa895e931eba976ccfa29867625759eb8441c4c /lib/gitlab | |
parent | 27442862cf81881c81552e64d0b4d3354535c45e (diff) | |
download | gitlab-ce-f1277fbf0bbe8de330d5d80fdfe411a0c8571022.tar.gz |
refactor code based on feedback
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb | 6 | ||||
-rw-r--r-- | lib/gitlab/import_export/after_export_strategies/web_upload_strategy.rb | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb b/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb index 21624cad43a..7cbf653dd97 100644 --- a/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb +++ b/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb @@ -53,7 +53,7 @@ module Gitlab end def self.lock_file_path(project) - return unless project.export_path || object_storage? + return unless project.export_path || export_file_exists? lock_path = project.import_export_shared.archive_path @@ -83,8 +83,8 @@ module Gitlab errors.full_messages.each { |msg| project.import_export_shared.add_error_message(msg) } end - def object_storage? - project.export_project_exists? + def export_file_exists? + project.export_file_exists? end end end diff --git a/lib/gitlab/import_export/after_export_strategies/web_upload_strategy.rb b/lib/gitlab/import_export/after_export_strategies/web_upload_strategy.rb index 01c1bca7ec9..4f29bdcea2c 100644 --- a/lib/gitlab/import_export/after_export_strategies/web_upload_strategy.rb +++ b/lib/gitlab/import_export/after_export_strategies/web_upload_strategy.rb @@ -44,7 +44,7 @@ module Gitlab end def export_file - project.export_file.open + project.export_file.open end def send_file_options @@ -59,7 +59,7 @@ module Gitlab end def export_size - project.export_file.file.size + project.export_file.file.size end end end |