From 4a2347da41278999c0e7441bcd7c5a42a67ba0ee Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 30 Nov 2016 15:24:57 +0100 Subject: Track successful PuSH deliveries --- app/workers/pubsubhubbub/delivery_worker.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/workers') diff --git a/app/workers/pubsubhubbub/delivery_worker.rb b/app/workers/pubsubhubbub/delivery_worker.rb index 6d526c2b1..20c72ce24 100644 --- a/app/workers/pubsubhubbub/delivery_worker.rb +++ b/app/workers/pubsubhubbub/delivery_worker.rb @@ -19,6 +19,8 @@ class Pubsubhubbub::DeliveryWorker .post(subscription.callback_url, body: payload) raise "Delivery failed for #{subscription.callback_url}: HTTP #{response.code}" unless response.code > 199 && response.code < 300 + + subscription.touch(:last_successful_delivery_at) end private -- cgit