diff --git a/app.py b/app.py index 7d00994..0ce1479 100644 --- a/app.py +++ b/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}} diff --git a/run.sh b/run.sh index a7eef03..8c9465c 100755 --- a/run.sh +++ b/run.sh @@ -1,3 +1,3 @@ #!/bin/bash python -c "import config; config.create_indexes()" -gunicorn -t 300 -w 5 -b 0.0.0.0:5005 --log-level debug app:app +gunicorn -t 600 -w 5 -b 0.0.0.0:5005 --log-level debug app:app