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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-09-20 14:18:08 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-09-20 14:18:08 +0300
commit5afcbe03ead9ada87621888a31a62652b10a7e4f (patch)
tree9918b67a0d0f0bafa6542e839a8be37adf73102d /app/models/project_import_state.rb
parentc97c0201564848c1f53226fe19d71fdcc472f7d0 (diff)
Add latest changes from gitlab-org/gitlab@16-4-stable-eev16.4.0-rc42
Diffstat (limited to 'app/models/project_import_state.rb')
-rw-r--r--app/models/project_import_state.rb7
1 files changed, 7 insertions, 0 deletions
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?