diff options
author | James Lopez <james@jameslopez.es> | 2018-01-26 12:43:13 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2018-01-26 17:26:26 +0300 |
commit | 865bb64a06f33b1076d1b9a202cd41c7ad0728c5 (patch) | |
tree | db74b8f7f1b2974ed99daf29be3e540b93d487d3 /app/workers | |
parent | 85d47384de293b33907990896c10034ec36498fd (diff) |
disable retry attempts for Import/Export until that is fixed
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/repository_import_worker.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/app/workers/repository_import_worker.rb b/app/workers/repository_import_worker.rb index 31e2798c36b..1a8be9d9a93 100644 --- a/app/workers/repository_import_worker.rb +++ b/app/workers/repository_import_worker.rb @@ -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 |