Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2017-12-12 21:05:46 +0300
committerLUKE BENNETT <lbennett@gitlab.com>2017-12-13 16:58:17 +0300
commit0e4dab9e5ffe65359f8d0fd98a4a156565783e98 (patch)
treeab55520dc446d600c27b419632ee6e7e44e8921f /app
parentb93a76b08f21e482d15118065eaf61f18451b4ae (diff)
Merge branch 'optimize-projects-for-imported-projects' into 'master'
check the import_status field before doing SQL operations to check the import url See merge request gitlab-org/gitlab-ce!15752 (cherry picked from commit 49a9de110e4d2a70d006759529822b3823b63f96) 946d87d3 check the import_status field before doing SQL operations to check the import url
Diffstat (limited to 'app')
-rw-r--r--app/models/project.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 6ae15a0a50f..3440c01b356 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -659,7 +659,8 @@ class Project < ActiveRecord::Base
end
def import_started?
- import? && import_status == 'started'
+ # import? does SQL work so only run it if it looks like there's an import running
+ import_status == 'started' && import?
end
def import_scheduled?