مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2026-04-22 22:44:29 +00:00
initial commit from appmail
هذا الالتزام موجود في:
15
app/jobs/renew_track_certificates_job.rb
Normal file
15
app/jobs/renew_track_certificates_job.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
class RenewTrackCertificatesJob < Postal::Job
|
||||
|
||||
def perform
|
||||
TrackCertificate.where("renew_after IS NULL OR renew_after <= ?", Time.now).each do |certificate|
|
||||
log "Renewing certificate for track domain ##{certificate.id} (#{certificate.domain})"
|
||||
if certificate.get
|
||||
log "Successfully renewed"
|
||||
else
|
||||
certificate.update(:renew_after => 1.day.from_now)
|
||||
log "Could not be renewed"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
المرجع في مشكلة جديدة
حظر مستخدم