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