diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-27 18:09:37 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-27 18:09:37 +0300 |
commit | 57ae76cdb503afd6c0821de3a03b4387af6b59eb (patch) | |
tree | d6ffcbdd75157d969fcd5f4850f3a11f21b95a6c /app/models | |
parent | 5471fef2360f9bcf604a026d5807a554dae243e9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/bulk_imports/tracker.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/models/bulk_imports/tracker.rb b/app/models/bulk_imports/tracker.rb index d1a6f3b9a80..d9efd489af5 100644 --- a/app/models/bulk_imports/tracker.rb +++ b/app/models/bulk_imports/tracker.rb @@ -33,11 +33,9 @@ class BulkImports::Tracker < ApplicationRecord entity_scope.where(stage: next_stage_scope).with_status(:created) } - def self.stage_running?(entity_id, stage) - where(stage: stage, bulk_import_entity_id: entity_id) - .with_status(:created, :enqueued, :started) - .exists? - end + scope :running_trackers, -> (entity_id) { + where(bulk_import_entity_id: entity_id).with_status(:enqueued, :started) + } def pipeline_class unless entity.pipeline_exists?(pipeline_name) |