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_metadata.rb')
-rw-r--r--app/models/ci/build_metadata.rb15
1 files changed, 8 insertions, 7 deletions
diff --git a/app/models/ci/build_metadata.rb b/app/models/ci/build_metadata.rb
index 2f28509f812..9b4794abb2e 100644
--- a/app/models/ci/build_metadata.rb
+++ b/app/models/ci/build_metadata.rb
@@ -5,21 +5,16 @@ module Ci
# Data that should be persisted forever, should be stored with Ci::Build model.
class BuildMetadata < Ci::ApplicationRecord
BuildTimeout = Struct.new(:value, :source)
- ROUTING_FEATURE_FLAG = :ci_partitioning_use_ci_builds_metadata_routing_table
include Ci::Partitionable
include Presentable
include ChronicDurationAttribute
include Gitlab::Utils::StrongMemoize
- self.table_name = 'ci_builds_metadata'
+ self.table_name = 'p_ci_builds_metadata'
self.primary_key = 'id'
- self.sequence_name = 'ci_builds_metadata_id_seq'
- partitionable scope: :build, through: {
- table: :p_ci_builds_metadata,
- flag: ROUTING_FEATURE_FLAG
- }
+ partitionable scope: :build
belongs_to :build, class_name: 'CommitStatus'
belongs_to :project
@@ -63,6 +58,12 @@ module Ci
runtime_runner_features[:cancel_gracefully] == true
end
+ def enable_debug_trace!
+ self.debug_trace_enabled = true
+ save! if changes.any?
+ true
+ end
+
private
def set_build_project