Commit 6a640a46 authored by James Lopez's avatar James Lopez
Browse files

disable retry attempts for Import/Export until that is fixed

parent b3a1a888290c
......@@ -568,6 +568,8 @@ def add_import_job
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 @@ def perform(project_id)
# 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 @@ def start_import(project)
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 @@ def error(error)
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