2019-06-24 20:35:12 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-02-19 18:09:10 +00:00
|
|
|
class PagesDomainSslRenewalCronWorker # rubocop:disable Scalability/IdempotentWorker
|
2019-06-24 20:35:12 +00:00
|
|
|
include ApplicationWorker
|
2020-02-11 18:08:58 +00:00
|
|
|
include CronjobQueue
|
2019-06-24 20:35:12 +00:00
|
|
|
|
2019-10-18 11:11:44 +00:00
|
|
|
feature_category :pages
|
|
|
|
|
2019-06-24 20:35:12 +00:00
|
|
|
def perform
|
2019-07-12 16:53:44 +00:00
|
|
|
return unless ::Gitlab::LetsEncrypt.enabled?
|
2019-06-13 11:37:45 +00:00
|
|
|
|
2020-02-11 18:08:58 +00:00
|
|
|
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-06-24 20:35:12 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|