From 5afcbe03ead9ada87621888a31a62652b10a7e4f Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 20 Sep 2023 11:18:08 +0000 Subject: Add latest changes from gitlab-org/gitlab@16-4-stable-ee --- app/models/project_import_state.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app/models/project_import_state.rb') diff --git a/app/models/project_import_state.rb b/app/models/project_import_state.rb index f16d661d4bb..a7b2c40557a 100644 --- a/app/models/project_import_state.rb +++ b/app/models/project_import_state.rb @@ -132,10 +132,17 @@ class ProjectImportState < ApplicationRecord alias_method :no_import?, :none? + # This method is coupled to the repository mirror domain. + # Use with caution in the importers domain. As an alternative, use the `#completed?` method. + # See EE-override and https://gitlab.com/gitlab-org/gitlab/-/merge_requests/4697 def in_progress? scheduled? || started? end + def completed? + finished? || failed? || canceled? + end + def started? # import? does SQL work so only run it if it looks like there's an import running status == 'started' && project.import? -- cgit v1.2.3