mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +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 InvalidAuthError < StandardError; end
|
||||||
class VerifyNotFoundWithDomain < StandardError; end
|
class VerifyNotFoundWithDomain < StandardError; end
|
||||||
include Sidekiq::Worker
|
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|
|
sidekiq_retry_in do |count|
|
||||||
1.hour.to_i
|
5.minutes.to_i * count
|
||||||
end
|
end
|
||||||
|
|
||||||
# If you need to clear scheduled jobs:
|
# If you need to clear scheduled jobs:
|
||||||
|
@ -130,7 +130,7 @@ class LetsEncryptWorker
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if verified_domains.empty?
|
if verified_domains.empty? || (site.created_at >= 2017 && !verified_domains.include?(domain_raw))
|
||||||
if @international_domain
|
if @international_domain
|
||||||
puts "still waiting on IDN support, ignoring failure for now"
|
puts "still waiting on IDN support, ignoring failure for now"
|
||||||
clean_wellknown_turds site
|
clean_wellknown_turds site
|
||||||
|
@ -160,6 +160,10 @@ class LetsEncryptWorker
|
||||||
end
|
end
|
||||||
|
|
||||||
clean_wellknown_turds site
|
clean_wellknown_turds site
|
||||||
|
|
||||||
|
if site.domain_fail_count > 0
|
||||||
|
LetsEncryptWorker.perform_in((5.minutes * site.domain_fail_count), site.id)
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue