2019-06-24 20:35:12 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-02-19 18:09:10 +00:00
|
|
|
class PagesDomainSslRenewalWorker # rubocop:disable Scalability/IdempotentWorker
|
2019-06-24 20:35:12 +00:00
|
|
|
include ApplicationWorker
|
|
|
|
|
2019-10-18 11:11:44 +00:00
|
|
|
feature_category :pages
|
2020-10-07 15:08:40 +00:00
|
|
|
tags :requires_disk_io
|
2019-10-18 11:11:44 +00:00
|
|
|
|
2019-06-24 20:35:12 +00:00
|
|
|
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
|