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/processable.rb')
-rw-r--r--app/models/ci/processable.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/ci/processable.rb b/app/models/ci/processable.rb
index 132f706d265..414d36da7c3 100644
--- a/app/models/ci/processable.rb
+++ b/app/models/ci/processable.rb
@@ -33,6 +33,12 @@ module Ci
where('NOT EXISTS (?)', needs)
end
+ scope :not_interruptible, -> do
+ joins(:metadata).where.not(
+ Ci::BuildMetadata.table_name => { id: Ci::BuildMetadata.scoped_build.with_interruptible.select(:id) }
+ )
+ end
+
state_machine :status do
event :enqueue do
transition [:created, :skipped, :manual, :scheduled] => :waiting_for_resource, if: :with_resource_group?