From 9082137b72e376984c82ea2bc37e0117cd14e63d Mon Sep 17 00:00:00 2001 From: Daniel Aleksandersen Date: Fri, 5 Mar 2021 17:51:57 +0100 Subject: [PATCH 1/3] Move WebSub callbacks to HTTPS --- apps/push/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/push/models.py b/apps/push/models.py index 9ed64e679..f9e7f65f0 100644 --- a/apps/push/models.py +++ b/apps/push/models.py @@ -49,7 +49,7 @@ class PushSubscriptionManager(models.Manager): # raise TypeError('callback cannot be None if there is not a reverable URL') # else: # # callback = 'http://' + Site.objects.get_current() + callback_path - callback = "http://push.newsblur.com/push/%s" % subscription.pk # + callback_path + callback = "https://push.newsblur.com/push/%s" % subscription.pk # + callback_path try: response = self._send_request(hub, { From e7eeb6a2a23391fd6fb6580bf5f5dc69709c74fb Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Tue, 9 Mar 2021 17:04:01 -0500 Subject: [PATCH 2/3] Failed feeds fetched monitor needs to handle edge case. --- utils/monitor_task_fetches.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils/monitor_task_fetches.py b/utils/monitor_task_fetches.py index f934c585e..aefb8439b 100755 --- a/utils/monitor_task_fetches.py +++ b/utils/monitor_task_fetches.py @@ -31,8 +31,9 @@ def main(): except Exception, e: failed = e - if feeds_fetched < 5000000 and feeds_fetched <= (redis_task_fetches - FETCHES_DROP_AMOUNT): - failed = True + if feeds_fetched < 5000000: + if redis_task_fetches > 0 and feeds_fetched <= (redis_task_fetches - FETCHES_DROP_AMOUNT): + failed = True if failed: requests.post( From a1475b3e5147bcba74332dee29f11851105b6ead Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Tue, 9 Mar 2021 17:05:55 -0500 Subject: [PATCH 3/3] Handling monitor failure --- utils/monitor_task_fetches.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/monitor_task_fetches.py b/utils/monitor_task_fetches.py index aefb8439b..192dae805 100755 --- a/utils/monitor_task_fetches.py +++ b/utils/monitor_task_fetches.py @@ -34,6 +34,8 @@ def main(): if feeds_fetched < 5000000: if redis_task_fetches > 0 and feeds_fetched <= (redis_task_fetches - FETCHES_DROP_AMOUNT): failed = True + elif redis_task_fetches <= 0: + failed = True if failed: requests.post(