summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-08-10 18:22:21 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-08-24 12:16:42 -0300
commit3c09000e18dcbf6a74ed1f749db3184e309cf081 (patch)
treea5746eb08a98574dd7396f863c1b6edc18b63261 /app
parentd65122823829bb449375cbb8d65c5f60a09729b7 (diff)
downloadgitlab-ce-3c09000e18dcbf6a74ed1f749db3184e309cf081.tar.gz
Does not halt the GitHub import process when an error occurs
Diffstat (limited to 'app')
-rw-r--r--app/models/project.rb2
-rw-r--r--app/workers/repository_import_worker.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 1855760e694..8cf093be4c3 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -471,8 +471,6 @@ class Project < ActiveRecord::Base
end
def reset_cache_and_import_attrs
- update(import_error: nil)
-
ProjectCacheWorker.perform_async(self.id)
self.import_data.destroy if self.import_data
diff --git a/app/workers/repository_import_worker.rb b/app/workers/repository_import_worker.rb
index e6701078f71..d2ca8813ab9 100644
--- a/app/workers/repository_import_worker.rb
+++ b/app/workers/repository_import_worker.rb
@@ -14,6 +14,8 @@ class RepositoryImportWorker
import_url: @project.import_url,
path: @project.path_with_namespace)
+ project.update_column(:import_error, nil)
+
result = Projects::ImportService.new(project, current_user).execute
if result[:status] == :error