2019-06-24 20:35:12 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class PagesDomainSslRenewalWorker
|
|
|
|
include ApplicationWorker
|
|
|
|
|
|
|
|
def perform(domain_id)
|
|
|
|
domain = PagesDomain.find_by_id(domain_id)
|
2019-06-13 11:37:45 +00:00
|
|
|
return unless domain&.enabled?
|
2019-07-12 16:53:44 +00:00
|
|
|
return unless ::Gitlab::LetsEncrypt.enabled?
|
2019-06-24 20:35:12 +00:00
|
|
|
|
|
|
|
::PagesDomains::ObtainLetsEncryptCertificateService.new(domain).execute
|
|
|
|
end
|
|
|
|
end
|