mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
improve retry for let's encrypt
This commit is contained in:
parent
ea467c1eef
commit
6e37fd7d25
1 changed files with 7 additions and 3 deletions
|
@ -4,10 +4,10 @@ class LetsEncryptWorker
|
|||
class InvalidAuthError < StandardError; end
|
||||
class VerifyNotFoundWithDomain < StandardError; end
|
||||
include Sidekiq::Worker
|
||||
sidekiq_options queue: :lets_encrypt_worker, retry: 1, backtrace: true
|
||||
sidekiq_options queue: :lets_encrypt_worker, retry: 10, backtrace: true
|
||||
|
||||
sidekiq_retry_in do |count|
|
||||
1.hour.to_i
|
||||
5.minutes.to_i * count
|
||||
end
|
||||
|
||||
# If you need to clear scheduled jobs:
|
||||
|
@ -130,7 +130,7 @@ class LetsEncryptWorker
|
|||
end
|
||||
end
|
||||
|
||||
if verified_domains.empty?
|
||||
if verified_domains.empty? || (site.created_at >= 2017 && !verified_domains.include?(domain_raw))
|
||||
if @international_domain
|
||||
puts "still waiting on IDN support, ignoring failure for now"
|
||||
clean_wellknown_turds site
|
||||
|
@ -160,6 +160,10 @@ class LetsEncryptWorker
|
|||
end
|
||||
|
||||
clean_wellknown_turds site
|
||||
|
||||
if site.domain_fail_count > 0
|
||||
LetsEncryptWorker.perform_in((5.minutes * site.domain_fail_count), site.id)
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue