Commit 865bb64a authored by James Lopez's avatar James Lopez

disable retry attempts for Import/Export until that is fixed

parent 85d47384
......@@ -568,6 +568,8 @@ class Project < ActiveRecord::Base
RepositoryForkWorker.perform_async(id,
forked_from_project.repository_storage_path,
forked_from_project.disk_path)
elsif gitlab_project_import?
RepositoryImportWorker.set(retry: false).perform_async(self.id)
else
RepositoryImportWorker.perform_async(self.id)
end
......
......@@ -20,7 +20,12 @@ class RepositoryImportWorker
# to those importers to mark the import process as complete.
return if service.async?
raise result[:message] if result[:status] == :error
if result[:status] == :error
fail_import(project, result[:message]) if project.gitlab_project_import?
raise result[:message]
end
project.after_import
end
......@@ -33,4 +38,8 @@ class RepositoryImportWorker
Rails.logger.info("Project #{project.full_path} was in inconsistent state (#{project.import_status}) while importing.")
false
end
def fail_import(project, message)
project.mark_import_as_failed(message)
end
end
......@@ -20,7 +20,7 @@ module Gitlab
error_out(error.message, caller[0].dup)
@errors << error.message
# Debug:
Rails.logger.error(error.backtrace.join("\n"))
Rails.logger.error(error.backtrace&.join("\n"))
end
private
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment