From 533cb3e771866bfb76424bc04e7776574368e3c6 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Mon, 8 Apr 2019 17:39:29 +0200 Subject: [PATCH] Tweak the cleanup --- app.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index 906af26..2cbbe7c 100644 --- a/app.py +++ b/app.py @@ -91,10 +91,6 @@ from poussetaches import PousseTaches phost = "http://" + os.getenv("COMPOSE_PROJECT_NAME", "") p = PousseTaches(f"{phost}_poussetaches_1:7991", f"{phost}_web_1:5005") -# Setup the cron tasks -p.push({}, "/task/cleanup_part_1", schedule="@every 12h") -p.push({}, "/task/cleanup_part_2", schedule="@every 12h") -p.push({}, "/task/cleanup_part_3", schedule="@every 12h") back = activitypub.MicroblogPubBackend() ap.use_backend(back) @@ -1268,6 +1264,11 @@ def outbox_activity_shares(item_id): @app.route("/admin", methods=["GET"]) @login_required def admin(): + # Setup the cron tasks + p.push({}, "/task/cleanup_part_1", schedule="@every 12h") + p.push({}, "/task/cleanup_part_2", schedule="@every 12h") + p.push({}, "/task/cleanup_part_3", schedule="@every 12h") + q = { "meta.deleted": False, "meta.undo": False,