From 657496b5a9488b904166c33764500b364e024679 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 14 May 2017 03:22:48 +0200 Subject: Do not cancel PuSH subscriptions after encountering "permanent" error… (#3046) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Do not cancel PuSH subscriptions after encountering "permanent" error response After talking with MMN about it, turns out some servers/php setups do return 4xx errors while rebooting, so this anti-feature that was meant to take load off of the hub is doing more harm than good in terms of breaking subscriptions * Update delivery_worker.rb --- spec/workers/pubsubhubbub/delivery_worker_spec.rb | 9 --------- 1 file changed, 9 deletions(-) (limited to 'spec/workers') diff --git a/spec/workers/pubsubhubbub/delivery_worker_spec.rb b/spec/workers/pubsubhubbub/delivery_worker_spec.rb index ec1e319d5..081dfa41c 100644 --- a/spec/workers/pubsubhubbub/delivery_worker_spec.rb +++ b/spec/workers/pubsubhubbub/delivery_worker_spec.rb @@ -22,15 +22,6 @@ describe Pubsubhubbub::DeliveryWorker do expect(subscription.reload.last_successful_delivery_at).to be_within(2).of(2.days.ago) end - it 'destroys subscription when request fails permanently' do - subscription = Fabricate(:subscription) - - stub_request_to_respond_with(subscription, 404) - subject.perform(subscription.id, payload) - - expect { subscription.reload }.to raise_error(ActiveRecord::RecordNotFound) - end - it 'raises when request fails' do subscription = Fabricate(:subscription) -- cgit