debian-mirror-gitlab/app/workers/pages_domain_ssl_renewal_cron_worker.rb

23 lines
534 B
Ruby
Raw Normal View History

2019-09-30 21:07:59 +05:30
# frozen_string_literal: true
2020-04-08 14:13:33 +05:30
class PagesDomainSslRenewalCronWorker # rubocop:disable Scalability/IdempotentWorker
2019-09-30 21:07:59 +05:30
include ApplicationWorker
2021-06-08 01:23:25 +05:30
2021-10-27 15:23:28 +05:30
data_consistency :always
2019-09-30 21:07:59 +05:30
include CronjobQueue
2019-12-21 20:55:43 +05:30
feature_category :pages
2021-10-27 15:23:28 +05:30
worker_resource_boundary :cpu
2019-12-21 20:55:43 +05:30
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