Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ci_project_mirrors_consistency_check_worker.rb « database « workers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e9413256617dc168af4c942721de5567681cde5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# frozen_string_literal: true

module Database
  class CiProjectMirrorsConsistencyCheckWorker
    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_project_mirrors_consistency_check, default_enabled: :yaml)

      results = ConsistencyCheckService.new(
        source_model: Project,
        target_model: Ci::ProjectMirror,
        source_columns: %w[id namespace_id],
        target_columns: %w[project_id namespace_id]
      ).execute

      log_extra_metadata_on_done(:results, results)
    end
  end
end