From 9e17197215a2e7b5390ee12aad79f3f876f15bf3 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Mon, 5 Jul 2021 15:47:33 +0200 Subject: only delete read article retrieved more than 60 days ago. --- newspipe/commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/newspipe/commands.py b/newspipe/commands.py index 2eba5d15..8bcefcad 100755 --- a/newspipe/commands.py +++ b/newspipe/commands.py @@ -101,12 +101,12 @@ def disable_inactive_users(last_seen): @application.cli.command("delete_read_articles") def delete_read_articles(): - "Delete read articles (and not liked) retrieved since more than 15 days ago." + "Delete read articles (and not liked) retrieved since more than 60 days ago." filter = {} filter["user_id__ne"] = 1 filter["readed"] = True filter["like"] = False - filter["retrieved_date__lt"] = date.today() - relativedelta(days=15) + filter["retrieved_date__lt"] = date.today() - relativedelta(days=60) articles = ArticleController().read(**filter).limit(5000) for article in articles: try: -- cgit