2018-06-27 07:23:28 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-02-19 18:09:10 +00:00
|
|
|
class PagesDomainVerificationWorker # rubocop:disable Scalability/IdempotentWorker
|
2018-02-06 13:25:46 +00:00
|
|
|
include ApplicationWorker
|
|
|
|
|
2021-07-21 12:09:35 +00:00
|
|
|
data_consistency :always
|
|
|
|
|
2021-04-30 18:10:09 +00:00
|
|
|
sidekiq_options retry: 3
|
|
|
|
|
2019-10-18 11:11:44 +00:00
|
|
|
feature_category :pages
|
|
|
|
|
2018-02-06 13:25:46 +00:00
|
|
|
def perform(domain_id)
|
2021-08-02 09:10:09 +00:00
|
|
|
return if Gitlab::Database.read_only?
|
2019-06-04 04:44:02 +00:00
|
|
|
|
2021-11-10 15:13:21 +00:00
|
|
|
domain = PagesDomain.find_by_id(domain_id)
|
2018-02-06 13:25:46 +00:00
|
|
|
|
|
|
|
return unless domain
|
|
|
|
|
|
|
|
VerifyPagesDomainService.new(domain).execute
|
|
|
|
end
|
|
|
|
end
|