gitlab-org--gitlab-foss/app/workers/database/ci_namespace_mirrors_consis...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
751 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Database
class CiNamespaceMirrorsConsistencyCheckWorker
include ApplicationWorker
include CronjobQueue # rubocop: disable Scalability/CronWorkerContext
sidekiq_options retry: false
feature_category :sharding
data_consistency :sticky
idempotent!
version 1
def perform
return if Feature.disabled?(:ci_namespace_mirrors_consistency_check, default_enabled: :yaml)
results = ConsistencyCheckService.new(
source_model: Namespace,
target_model: Ci::NamespaceMirror,
source_columns: %w[id traversal_ids],
target_columns: %w[namespace_id traversal_ids]
).execute
log_extra_metadata_on_done(:results, results)
end
end
end