Module: Ci::Partitionable
- Extended by:
- ActiveSupport::Concern
- Includes:
- Gitlab::Utils::StrongMemoize
- Included in:
- BuildMetadata, BuildNeed, BuildPendingState, BuildReportResult, BuildRunnerSession, BuildTraceChunk, BuildTraceMetadata, JobAnnotation, JobArtifact, JobVariable, PendingBuild, Pipeline, PipelineVariable, RunnerManagerBuild, RunningBuild, Sources::Pipeline, Stage, UnitTestFailure, CommitStatus
- Defined in:
- app/models/concerns/ci/partitionable.rb,
app/models/concerns/ci/partitionable/switch.rb
Overview
This module implements a way to set the ‘partition_id` value on a dependent resource from a parent record. Usage:
class PipelineVariable < Ci::ApplicationRecord
include Ci::Partitionable
belongs_to :pipeline
partitionable scope: :pipeline
# Or
partitionable scope: ->(record) { record.partition_value }
Defined Under Namespace
Constant Summary collapse
- MUTEX =
Mutex.new