Schedule media retention at 03:00 Europe/Berlin.
Deploy Development / deploy (push) Successful in 1m1s
Test Suite / pytest-backend (push) Failing after 49s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 19s
Test Suite / k6 /health Baseline (push) Successful in 35s
Test Suite / playwright-tests (push) Failing after 7m57s

The folded python -c command crashed the cron container before any run. Content-report rate limiting now applies only after the good-faith declaration.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-10-28 11:14:37 +01:00
1 parent f10c28e5cd
commit 95d365d9fa
7 files changed
+317 -21

No files matched your search

+2 -14
View File
@@ -89,20 +89,7 @@ services:
context: ./backend
dockerfile: Dockerfile
container_name: shinkan-retention-cron
command: >
python -c "
import time, subprocess, sys, os, datetime
def next_3am():
now = datetime.datetime.now()
target = now.replace(hour=3, minute=0, second=0, microsecond=0)
if target <= now:
target += datetime.timedelta(days=1)
return (target - now).total_seconds()
subprocess.run([sys.executable, 'scripts/media_retention_job.py'], check=False)
while True:
time.sleep(next_3am())
subprocess.run([sys.executable, 'scripts/media_retention_job.py'], check=False)
"
command: ["python", "-u", "scripts/media_retention_scheduler.py"]
working_dir: /app
environment:
DB_HOST: postgres
@@ -110,6 +97,7 @@ services:
DB_NAME: shinkan
DB_USER: shinkan_user
DB_PASSWORD: ${DB_PASSWORD}
PYTHONUNBUFFERED: "1"
MEDIA_ROOT: "${MEDIA_ROOT:-/app/media}"
# Loeschkonzept (Audit P-03b): 30 Tage Soft-Trash, dann 30 Tage Hidden, dann Purge (gesamt 60 Tage).
MEDIA_TRASH_SOFT_TO_HIDDEN_DAYS: "${MEDIA_TRASH_SOFT_TO_HIDDEN_DAYS:-30}"