summaryrefslogtreecommitdiff
path: root/app/workers/repository_check/dispatch_worker.rb
blob: 891a273afd7417bd6b2ac79d720668c9755cc778 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module RepositoryCheck
  class DispatchWorker
    include ApplicationWorker
    include CronjobQueue
    include ::EachShardWorker

    def perform
      return unless Gitlab::CurrentSettings.repository_checks_enabled

      each_eligible_shard do |shard_name|
        RepositoryCheck::BatchWorker.perform_async(shard_name)
      end
    end
  end
end