2018-06-27 07:23:28 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-02-19 18:09:10 +00:00
|
|
|
class PagesDomainVerificationCronWorker # rubocop:disable Scalability/IdempotentWorker
|
2018-02-06 13:25:46 +00:00
|
|
|
include ApplicationWorker
|
2020-02-11 18:08:58 +00:00
|
|
|
include CronjobQueue
|
2018-02-06 13:25:46 +00:00
|
|
|
|
2019-10-18 11:11:44 +00:00
|
|
|
feature_category :pages
|
|
|
|
|
2018-02-06 13:25:46 +00:00
|
|
|
def perform
|
2019-06-04 04:44:02 +00:00
|
|
|
return if Gitlab::Database.read_only?
|
|
|
|
|
2020-02-11 18:08:58 +00:00
|
|
|
PagesDomain.needs_verification.with_logging_info.find_each do |domain|
|
|
|
|
with_context(project: domain.project) do
|
|
|
|
PagesDomainVerificationWorker.perform_async(domain.id)
|
|
|
|
end
|
2018-02-06 13:25:46 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|