2018-06-27 03:23:28 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-02-06 08:25:46 -05:00
|
|
|
class PagesDomainVerificationWorker
|
|
|
|
include ApplicationWorker
|
|
|
|
|
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
|