2019-09-30 21:07:59 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-04-08 14:13:33 +05:30
|
|
|
class PagesDomainSslRenewalWorker # rubocop:disable Scalability/IdempotentWorker
|
2019-09-30 21:07:59 +05:30
|
|
|
include ApplicationWorker
|
|
|
|
|
2019-12-21 20:55:43 +05:30
|
|
|
feature_category :pages
|
2021-01-03 14:25:43 +05:30
|
|
|
tags :requires_disk_io
|
2019-12-21 20:55:43 +05:30
|
|
|
|
2019-09-30 21:07:59 +05:30
|
|
|
def perform(domain_id)
|
|
|
|
domain = PagesDomain.find_by_id(domain_id)
|
|
|
|
return unless domain&.enabled?
|
|
|
|
return unless ::Gitlab::LetsEncrypt.enabled?
|
|
|
|
|
|
|
|
::PagesDomains::ObtainLetsEncryptCertificateService.new(domain).execute
|
|
|
|
end
|
|
|
|
end
|