Commit 49a9de11 authored by Yorick Peterse's avatar Yorick Peterse

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
parents ad1c186e 946d87d3
No related merge requests found
......@@ -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?
......
---
title: check the import_status field before doing SQL operations to check the import
url
merge_request:
author:
type: performance
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