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:
Diffstat (limited to 'app/workers/concerns/gitlab/github_import/object_importer.rb')
-rw-r--r--app/workers/concerns/gitlab/github_import/object_importer.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/workers/concerns/gitlab/github_import/object_importer.rb b/app/workers/concerns/gitlab/github_import/object_importer.rb
index 408354d5caa..6cb9bd34969 100644
--- a/app/workers/concerns/gitlab/github_import/object_importer.rb
+++ b/app/workers/concerns/gitlab/github_import/object_importer.rb
@@ -38,8 +38,12 @@ module Gitlab
# client - An instance of `Gitlab::GithubImport::Client`
# hash - A Hash containing the details of the object to import.
def import(project, client, hash)
- if project.import_state&.canceled?
- info(project.id, message: 'project import canceled')
+ unless project.import_state&.in_progress?
+ info(
+ project.id,
+ message: 'Project import is no longer running. Stopping worker.',
+ import_status: project.import_state.status
+ )
return
end