~cedric/newspipe

cf23becb8bc923106223e564f7d77ea768ec6a9d — Cédric Bonhomme 5 months ago 9aa14c6
chg: [commands] delete_read_articles will delete only 5000 articles.
1 files changed, 1 insertions(+), 1 deletions(-)

M newspipe/commands.py
M newspipe/commands.py => newspipe/commands.py +1 -1
@@ 106,7 106,7 @@ def delete_read_articles():
    filter["user_id__ne"] = 1
    #filter["readed"] = True # temporary comment
    filter["retrieved_date__lt"] = date.today() - relativedelta(days=5)
    articles = ArticleController().read(**filter).limit(10000)
    articles = ArticleController().read(**filter).limit(5000)
    for article in articles:
        try:
            db.session.delete(article)