Add periodic cleanup cron job for temp data and stale processes (#4781)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
LawyZheng
2026-02-18 23:10:00 +08:00
committed by GitHub
parent 4db25ec04f
commit f6e79781c1
4 changed files with 401 additions and 0 deletions

View File

@@ -427,6 +427,14 @@ class Settings(BaseSettings):
ENCRYPTOR_AES_SALT: str | None = None
ENCRYPTOR_AES_IV: str | None = None
# Cleanup Cron Settings
ENABLE_CLEANUP_CRON: bool = False
"""Enable periodic cleanup of temporary data (temp files and stale processes)."""
CLEANUP_CRON_INTERVAL_MINUTES: int = 10
"""Interval in minutes for the cleanup cron job."""
CLEANUP_STALE_TASK_THRESHOLD_HOURS: int = 24
"""Tasks/workflows not updated for this many hours are considered stale (stuck)."""
# OpenTelemetry Settings
OTEL_ENABLED: bool = False
OTEL_SERVICE_NAME: str = "skyvern"