Class: CertWatch::RenewCertificateJob

Inherits:
Object
  • Object
show all
Extended by:
StateMachineJob
Defined in:
app/jobs/cert_watch/renew_certificate_job.rb

Class Method Summary collapse

Class Method Details

.perform_with_result(certificate, _options = {}) ⇒ Object


7
8
9
10
11
12
13
14
# File 'app/jobs/cert_watch/renew_certificate_job.rb', line 7

def self.perform_with_result(certificate, _options = {})
  CertWatch.client.renew(certificate.domain)
  certificate.last_renewed_at = Time.now
  :ok
rescue RenewError
  certificate.last_renewal_failed_at = Time.now
  :error
end