From 006db2960c8f86609c4280c68edf598d291271dc Mon Sep 17 00:00:00 2001 From: Jason Date: Mon, 9 Nov 2020 01:36:51 +0000 Subject: [PATCH] change to 3 days --- apiserver/feed.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apiserver/feed.py b/apiserver/feed.py index c7f4f14..f6679de 100644 --- a/apiserver/feed.py +++ b/apiserver/feed.py @@ -11,8 +11,11 @@ import settings from feeds import hackernews, reddit, tildes, substack, manual, news from scrapers import outline, declutter, local +ONE_HOUR = 60*60 +ONE_DAY = 24*ONE_HOUR + INVALID_DOMAINS = ['youtube.com', 'bloomberg.com', 'wsj.com'] -TWO_DAYS = 60*60*24*2 +MAX_AGE_IN_DAYS = 3*ONE_DAY substacks = {} for key, value in settings.SUBSTACK.items(): @@ -118,7 +121,7 @@ def update_story(story, is_manual=False): logging.info('Story not ready yet') return False - if story['date'] and not is_manual and story['date'] + TWO_DAYS < time.time(): + if story['date'] and not is_manual and story['date'] + MAX_AGE_IN_DAYS < time.time(): logging.info('Story too old, removing') return False