diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-12 18:09:39 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-12 18:09:39 +0300 |
commit | dc889678d1de8c09310b2f8f9742bb6c78a6f1a4 (patch) | |
tree | 70945aa6721a271fc8057efa13c3216a03fbac45 /app/models/project_import_state.rb | |
parent | cd52759ee33051b8ad7b88b02ba7954e4fad7018 (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.rb | 4 |
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') |