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

pages_domain_removal_cron_worker.rb « workers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4744c8553940710cdf56d6949ff845907e5b5730 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

class PagesDomainRemovalCronWorker # rubocop:disable Scalability/IdempotentWorker
  include ApplicationWorker

  data_consistency :always

  include CronjobQueue

  feature_category :pages
  worker_resource_boundary :cpu

  def perform
    PagesDomain.for_removal.with_logging_info.find_each do |domain|
      with_context(project: domain.project) { domain.destroy! }
    rescue StandardError => e
      Gitlab::ErrorTracking.track_exception(e)
    end
  end
end