Cleanup expired task

This commit is contained in:
shamoon
2025-11-05 13:21:53 -08:00
parent b4972d2bca
commit 964e606a8e
2 changed files with 34 additions and 0 deletions

View File

@@ -230,6 +230,17 @@ def _parse_beat_schedule() -> dict:
"expires": 59.0 * 60.0,
},
},
{
"name": "Cleanup expired share bundles",
"env_key": "PAPERLESS_SHARE_BUNDLE_CLEANUP_CRON",
# Default daily at 02:00
"env_default": "0 2 * * *",
"task": "documents.tasks.cleanup_expired_share_bundles",
"options": {
# 1 hour before default schedule sends again
"expires": 23.0 * 60.0 * 60.0,
},
},
]
for task in tasks:
# Either get the environment setting or use the default