~cedric/newspipe

9aa14c690b5a749b35dc9081871e0a12fc01e206 — Cédric Bonhomme 5 months ago 073f18c
chg: [commands] delete_read_articles will also delete unread articles.
1 files changed, 2 insertions(+), 2 deletions(-)

M newspipe/commands.py
M newspipe/commands.py => newspipe/commands.py +2 -2
@@ 104,9 104,9 @@ def delete_read_articles():
    "Delete read articles retrieved since more than 5 days ago."
    filter = {}
    filter["user_id__ne"] = 1
    filter["readed"] = True
    #filter["readed"] = True # temporary comment
    filter["retrieved_date__lt"] = date.today() - relativedelta(days=5)
    articles = ArticleController().read(**filter)
    articles = ArticleController().read(**filter).limit(10000)
    for article in articles:
        try:
            db.session.delete(article)