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/models/ci/build.rb')
-rw-r--r--app/models/ci/build.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 71c4501f57b..2393540b04c 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -88,7 +88,11 @@ module Ci
validates :coverage, numericality: true, allow_blank: true
validates :ref, presence: true
- scope :not_interruptible, -> { joins(:metadata).where(ci_builds_metadata: { interruptible: false }) }
+ scope :not_interruptible, -> do
+ joins(:metadata).where('ci_builds_metadata.id NOT IN (?)',
+ Ci::BuildMetadata.scoped_build.with_interruptible.select(:id))
+ end
+
scope :unstarted, ->() { where(runner_id: nil) }
scope :ignore_failures, ->() { where(allow_failure: false) }
scope :with_artifacts_archive, ->() do