diff --git a/app/jobs/whois_sync_job.rb b/app/jobs/whois_sync_job.rb index c0e1d17..1532245 100644 --- a/app/jobs/whois_sync_job.rb +++ b/app/jobs/whois_sync_job.rb @@ -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) diff --git a/test/jobs/whois_sync_job_test.rb b/test/jobs/whois_sync_job_test.rb index fbbdcb7..67464f5 100644 --- a/test/jobs/whois_sync_job_test.rb +++ b/test/jobs/whois_sync_job_test.rb @@ -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