Merge branch 'master' into dashboard3

* master:
  Handling monitor failure
  Failed feeds fetched monitor needs to handle edge case.
  Move WebSub callbacks to HTTPS
This commit is contained in:
Samuel Clay 2021-03-09 17:07:04 -05:00
commit c424c3bb0f
2 changed files with 6 additions and 3 deletions

View file

@ -48,7 +48,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, {

View file

@ -31,7 +31,10 @@ def main():
except Exception as e:
failed = e
if feeds_fetched < 5000000 and feeds_fetched <= (redis_task_fetches - FETCHES_DROP_AMOUNT):
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: