mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-15 11:14:28 +00:00
Tweak the cleanup
This commit is contained in:
parent
643ba9e775
commit
533cb3e771
1 changed files with 5 additions and 4 deletions
9
app.py
9
app.py
|
@ -91,10 +91,6 @@ from poussetaches import PousseTaches
|
||||||
|
|
||||||
phost = "http://" + os.getenv("COMPOSE_PROJECT_NAME", "")
|
phost = "http://" + os.getenv("COMPOSE_PROJECT_NAME", "")
|
||||||
p = PousseTaches(f"{phost}_poussetaches_1:7991", f"{phost}_web_1:5005")
|
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()
|
back = activitypub.MicroblogPubBackend()
|
||||||
ap.use_backend(back)
|
ap.use_backend(back)
|
||||||
|
@ -1268,6 +1264,11 @@ def outbox_activity_shares(item_id):
|
||||||
@app.route("/admin", methods=["GET"])
|
@app.route("/admin", methods=["GET"])
|
||||||
@login_required
|
@login_required
|
||||||
def admin():
|
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 = {
|
q = {
|
||||||
"meta.deleted": False,
|
"meta.deleted": False,
|
||||||
"meta.undo": False,
|
"meta.undo": False,
|
||||||
|
|
Loading…
Reference in a new issue