diff options
Diffstat (limited to 'app/models/ci/running_build.rb')
-rw-r--r-- | app/models/ci/running_build.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/ci/running_build.rb b/app/models/ci/running_build.rb index cfdc47de531..e70ba3c97c3 100644 --- a/app/models/ci/running_build.rb +++ b/app/models/ci/running_build.rb @@ -10,14 +10,14 @@ module Ci # of the running builds there is worth the additional pressure. class RunningBuild < Ci::ApplicationRecord include Ci::Partitionable - include SafelyChangeColumnDefault - - columns_changing_default :partition_id partitionable scope: :build belongs_to :project - belongs_to :build, class_name: 'Ci::Build' + belongs_to :build, # rubocop: disable Rails/InverseOf -- this relation is not present on build + ->(running_build) { in_partition(running_build) }, + class_name: 'Ci::Build', + partition_foreign_key: :partition_id belongs_to :runner, class_name: 'Ci::Runner' enum runner_type: ::Ci::Runner.runner_types |