mirror of
https://github.com/viq/NewsBlur.git
synced 2025-08-05 16:49:45 +00:00
Changing cutoff dates when fetching stories, fixing issues around Oldest first for both unreads and all stories.
This commit is contained in:
parent
0baaa951b9
commit
fdeca57412
2 changed files with 5 additions and 3 deletions
|
@ -214,14 +214,16 @@ class UserSubscription(models.Model):
|
|||
pipeline.execute()
|
||||
r.delete(unread_ranked_stories_key)
|
||||
|
||||
current_time = int(time.time() + 60*60*24)
|
||||
if not cutoff_date:
|
||||
cutoff_date = datetime.datetime.now() - datetime.timedelta(days=self.user.profile.days_of_story_hashes)
|
||||
if read_filter == "unread":
|
||||
cutoff_date = datetime.datetime.now() - datetime.timedelta(days=self.user.profile.days_of_unread)
|
||||
cutoff_date = max(cutoff_date, self.mark_read_date)
|
||||
elif read_filter == "all":
|
||||
cutoff_date = datetime.datetime.now() - datetime.timedelta(days=self.user.profile.days_of_story_hashes)
|
||||
elif default_cutoff_date:
|
||||
cutoff_date = default_cutoff_date
|
||||
|
||||
current_time = int(time.time() + 60*60*24)
|
||||
if order == 'oldest':
|
||||
byscorefunc = rt.zrangebyscore
|
||||
if read_filter == 'unread':
|
||||
|
|
|
@ -33,7 +33,7 @@ DEBUG_ASSETS = True
|
|||
# down verbosity.
|
||||
DEBUG_QUERIES = DEBUG
|
||||
DEBUG_QUERIES_SUMMARY_ONLY = True
|
||||
# DEBUG_QUERIES_SUMMARY_ONLY = False
|
||||
DEBUG_QUERIES_SUMMARY_ONLY = False
|
||||
|
||||
MEDIA_URL = '/media/'
|
||||
IMAGES_URL = '/imageproxy'
|
||||
|
|
Loading…
Add table
Reference in a new issue