Tweak tasks
This commit is contained in:
parent
27622813ec
commit
12faea3c29
8
app.py
8
app.py
|
@ -1434,6 +1434,14 @@ def admin_cleanup2():
|
|||
}
|
||||
)
|
||||
|
||||
return "OK"
|
||||
|
||||
|
||||
@app.route("/admin/cleanup3", methods=["GET"])
|
||||
@login_required
|
||||
def admin_cleanup3():
|
||||
d = (datetime.utcnow() - timedelta(days=45)).strftime("%Y-%m-%d")
|
||||
|
||||
# Delete old replies we don't care about
|
||||
DB.activities.delete_many(
|
||||
{"box": Box.REPLIES.value, "meta.keep": False, "activity.published": {"$lt": d}}
|
||||
|
|
Loading…
Reference in a new issue