Expire scheduled archives with retained backup safeguards

This commit is contained in:
parkel committed 2026-11-21 15:08:48 +01:00
1 parent d088a487a3
commit cb8295dc38
10 files changed
+571 -14

No files matched your search

+11
View File
@@ -132,6 +132,10 @@ LOCAL_ACCOUNT_BACKUPS = os.environ.get("COULOBRE_LOCAL_ACCOUNT_BACKUPS") == "1"
LOCAL_ACCOUNT_BACKUP_MAIL = (
os.environ.get("COULOBRE_LOCAL_ACCOUNT_BACKUP_MAIL") == "1"
)
LOCAL_BACKUP_RETENTION = (
LOCAL_ACCOUNT_BACKUPS
and os.environ.get("COULOBRE_LOCAL_BACKUP_RETENTION") == "1"
)
LOCAL_WEBSITE_RESTORE = (
LOCAL_ACCOUNT_BACKUPS
and os.environ.get("COULOBRE_LOCAL_WEBSITE_RESTORE") == "1"
@@ -203,3 +207,10 @@ if LOCAL_ACCOUNT_BACKUPS:
"schedule": 5.0,
"options": {"expires": 4.0},
}
if LOCAL_BACKUP_RETENTION:
CELERY_BEAT_SCHEDULE["plan-account-backup-expirations"] = {
"task": "coulobre.hosting.tasks.plan_account_backup_expirations",
"schedule": 300.0,
"options": {"expires": 295.0},
}