mirror of
https://github.com/Evolix/chexpire.git
synced 2024-04-25 13:33:04 +02:00
Do not automatically mark as inactive checks for domain not found
This renders explicit the failures after X fails, and notify the user.
This commit is contained in:
parent
7a7ef4407b
commit
5d1fa13fba
|
@ -20,9 +20,6 @@ class WhoisSyncJob < ApplicationJob
|
|||
return unless response.valid?
|
||||
|
||||
update_from_response(response)
|
||||
rescue Whois::DomainNotFoundError
|
||||
check.active = false
|
||||
check.save!
|
||||
end
|
||||
|
||||
def update_from_response(response)
|
||||
|
|
|
@ -60,7 +60,7 @@ class WhoisSyncJobTest < ActiveJob::TestCase
|
|||
assert_equal 1, check.consecutive_failures
|
||||
end
|
||||
|
||||
test "disable check when whois responds domain not found" do
|
||||
test "increment consecutive failures when whois responds domain not found" do
|
||||
domain = "willneverexist.fr"
|
||||
check = create(:check, :nil_dates, domain: domain)
|
||||
|
||||
|
@ -70,7 +70,6 @@ class WhoisSyncJobTest < ActiveJob::TestCase
|
|||
|
||||
check.reload
|
||||
|
||||
refute check.active?
|
||||
assert_just_now check.last_run_at
|
||||
assert_nil check.last_success_at
|
||||
assert_equal 1, check.consecutive_failures
|
||||
|
|
Loading…
Reference in a new issue