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>2020-03-12 18:09:39 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-12 18:09:39 +0300
commitdc889678d1de8c09310b2f8f9742bb6c78a6f1a4 (patch)
tree70945aa6721a271fc8057efa13c3216a03fbac45 /app/models/project_import_state.rb
parentcd52759ee33051b8ad7b88b02ba7954e4fad7018 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/project_import_state.rb')
-rw-r--r--app/models/project_import_state.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/project_import_state.rb b/app/models/project_import_state.rb
index b79e3554926..cdb034e58fa 100644
--- a/app/models/project_import_state.rb
+++ b/app/models/project_import_state.rb
@@ -98,6 +98,10 @@ class ProjectImportState < ApplicationRecord
Gitlab::SidekiqStatus.set(jid, StuckImportJobsWorker::IMPORT_JOBS_EXPIRATION)
end
+
+ def self.jid_by(project_id:, status:)
+ select(:jid).with_status(status).find_by(project_id: project_id)
+ end
end
ProjectImportState.prepend_if_ee('EE::ProjectImportState')