diff options
author | Vladimir Shushlin <v.shushlin@gmail.com> | 2019-06-13 14:37:45 +0300 |
---|---|---|
committer | Vladimir Shushlin <v.shushlin@gmail.com> | 2019-06-25 11:30:12 +0300 |
commit | 432f2bbc9cf64d53418c1eb9bb701254803a0e1e (patch) | |
tree | 6f93c0b6ecafcdcf7ca7f76d48b7a5afa2319204 /app/workers/pages_domain_ssl_renewal_worker.rb | |
parent | 3115c9fc121743dea29aa92a603a0c782eb3d75b (diff) |
Use project depended feature flag for pages ssl
Also add ::Gitlab::LetsEncrypt.enabled? shortcut
and simplify it a lot
Diffstat (limited to 'app/workers/pages_domain_ssl_renewal_worker.rb')
-rw-r--r-- | app/workers/pages_domain_ssl_renewal_worker.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/workers/pages_domain_ssl_renewal_worker.rb b/app/workers/pages_domain_ssl_renewal_worker.rb index 00c9c4782d8..b32458ca777 100644 --- a/app/workers/pages_domain_ssl_renewal_worker.rb +++ b/app/workers/pages_domain_ssl_renewal_worker.rb @@ -4,11 +4,9 @@ class PagesDomainSslRenewalWorker include ApplicationWorker def perform(domain_id) - return unless ::Gitlab::LetsEncrypt::Client.new.enabled? - domain = PagesDomain.find_by_id(domain_id) - - return unless domain + return unless domain&.enabled? + return unless ::Gitlab::LetsEncrypt.enabled?(domain) ::PagesDomains::ObtainLetsEncryptCertificateService.new(domain).execute end |