2019-09-30 21:07:59 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class PagesDomainSslRenewalCronWorker
|
|
|
|
include ApplicationWorker
|
|
|
|
include CronjobQueue
|
|
|
|
|
2019-12-21 20:55:43 +05:30
|
|
|
feature_category :pages
|
|
|
|
|
2019-09-30 21:07:59 +05:30
|
|
|
def perform
|
|
|
|
return unless ::Gitlab::LetsEncrypt.enabled?
|
|
|
|
|
2020-03-13 15:44:24 +05:30
|
|
|
PagesDomain.need_auto_ssl_renewal.with_logging_info.find_each do |domain|
|
|
|
|
with_context(project: domain.project) do
|
|
|
|
PagesDomainSslRenewalWorker.perform_async(domain.id)
|
|
|
|
end
|
2019-09-30 21:07:59 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|