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/running_build.rb')
-rw-r--r--app/models/ci/running_build.rb8
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