fix for retention logic

This commit is contained in:
onysd 2026-09-03 05:00:42 +03:00
parent 70c0ba44f0
commit e6bfe2d444
35 changed files with 2108 additions and 132 deletions

View file

@ -319,6 +319,27 @@ TELESRV_STORAGE_RETENTION_MODE=off
# check on the shared TELESRV_RETENTION_INTERVAL/TELESRV_RETENTION_BATCH
# cadence (Advanced section below).
TELESRV_STORAGE_RETENTION_MAX_AGE=720h
# Optional per-category overrides of the shared age above (Photo/Video/Round
# Video/Gif/Music/Voice/File/Avatar) -- each empty/unset value falls back to
# TELESRV_STORAGE_RETENTION_MAX_AGE. The mode switch above still applies to
# all of them; these only let one category expire sooner or later than the
# rest (e.g. purge voice notes after a week but keep files for a year).
TELESRV_STORAGE_RETENTION_MAX_AGE_PHOTO=
TELESRV_STORAGE_RETENTION_MAX_AGE_VIDEO=
TELESRV_STORAGE_RETENTION_MAX_AGE_ROUND_VIDEO=
TELESRV_STORAGE_RETENTION_MAX_AGE_GIF=
TELESRV_STORAGE_RETENTION_MAX_AGE_MUSIC=
TELESRV_STORAGE_RETENTION_MAX_AGE_VOICE=
TELESRV_STORAGE_RETENTION_MAX_AGE_FILE=
TELESRV_STORAGE_RETENTION_MAX_AGE_AVATAR=
# Once enabled, actively reclaims space once total physical storage exceeds
# TELESRV_STORAGE_MAX_TOTAL_BYTES above: the oldest files (regardless of
# category/age) are purged the same way "hard" retention mode purges blob
# bytes, until back under budget. Independent of the retention mode switch
# above -- can run even when that's "off". Default false: TELESRV_STORAGE_MAX_
# TOTAL_BYTES otherwise only ever blocks new uploads, never reclaims from
# existing ones.
TELESRV_STORAGE_EVICTION_ENABLE=false
# ==============================================================================