# frozen_string_literal: true

module Geo
  class PipelineArtifactReplicator < Gitlab::Geo::Replicator
    include ::Geo::BlobReplicatorStrategy
    extend ::Gitlab::Utils::Override

    def self.model
      ::Ci::PipelineArtifact
    end

    def carrierwave_uploader
      model_record.file
    end

    override :verification_feature_flag_enabled?
    def self.verification_feature_flag_enabled?
      # We are adding verification at the same time as replication, so we don't
      # need to toggle verification separately from replication. When the
      # replication feature flag is off, then verification is also off (see
      # `VerifiableReplicator.verification_enabled?`)
      true
    end
  end
end
