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
|
|
|
|
|
2019-10-18 07:11:44 -04:00
|
|
|
feature_category :pages
|
|
|
|
|
2018-08-27 11:31:01 -04:00
|
|
|
# rubocop: disable CodeReuse/ActiveRecord
|
2018-02-06 08:25:46 -05:00
|
|
|
def perform(domain_id)
|
2019-06-04 00:44:02 -04:00
|
|
|
return if Gitlab::Database.read_only?
|
|
|
|
|
2018-02-06 08:25:46 -05:00
|
|
|
domain = PagesDomain.find_by(id: domain_id)
|
|
|
|
|
|
|
|
return unless domain
|
|
|
|
|
|
|
|
VerifyPagesDomainService.new(domain).execute
|
|
|
|
end
|
2018-08-27 11:31:01 -04:00
|
|
|
# rubocop: enable CodeReuse/ActiveRecord
|
2018-02-06 08:25:46 -05:00
|
|
|
end
|