Tweak tasks
This commit is contained in:
parent
27622813ec
commit
12faea3c29
2 changed files with 9 additions and 1 deletions
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}}
|
||||
|
|
2
run.sh
2
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
|
||||
|
|
Loading…
Reference in a new issue