diff options
Diffstat (limited to 'app/models/ci/running_build.rb')
-rw-r--r-- | app/models/ci/running_build.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/models/ci/running_build.rb b/app/models/ci/running_build.rb index ae38d54862d..43214b0c336 100644 --- a/app/models/ci/running_build.rb +++ b/app/models/ci/running_build.rb @@ -1,7 +1,18 @@ # frozen_string_literal: true module Ci + # This model represents metadata for a running build. + # Despite the generic RunningBuild name, in this first iteration it applies only to shared runners + # (see Ci::RunningBuild.upsert_shared_runner_build!). + # The decision to insert all of the running builds here was deferred to avoid the pressure on the database as + # at this time that was not necessary. + # We can reconsider the decision to limit this only to shared runners when there is more evidence that inserting all + # of the running builds there is worth the additional pressure. class RunningBuild < Ci::ApplicationRecord + include Ci::Partitionable + + partitionable scope: :build + belongs_to :project belongs_to :build, class_name: 'Ci::Build' belongs_to :runner, class_name: 'Ci::Runner' |