feat(storage): add team auto-archive assets policy and background job (#516)

* feat(storage): add team auto-archive assets policy and background job

* fix(storage): address code review feedback on lock safety, starvation, and permissions

* docs: update readme and expand archive storage documentation with auto-archive details

* feat(storage): log info message on auto-archive job start and finish with archived count

* style(storage): stack age threshold and grace period vertically with updated grace period description

* fix(storage): only log auto-archive info messages when candidate assets are found to process
This commit is contained in:
Yiling-J
2026-11-04 14:40:44 +08:00
committed by GitHub
parent ba3c6dbfee
commit 2ecbd49d18
23 changed files with 1805 additions and 39 deletions
+32
View File
@@ -274,6 +274,38 @@
"turntable_testing": "Testing...",
"integrations": "Integrations",
"integrations_settings_description": "Configure third-party service integrations for media rendering and document processing.",
"storage": "Storage",
"storage_settings": "Storage Settings",
"storage_settings_description": "View archive storage status and configure automatic asset archival policies.",
"archive_storage_config_card": "Archive Storage Configuration",
"archive_storage_config_card_description": "Current system archive storage backend details configured through server environment variables.",
"archive_storage_configured": "Configured",
"archive_storage_not_configured": "Not Configured",
"archive_storage_backend": "Storage Backend",
"archive_storage_backend_s3": "Amazon S3 / S3-compatible",
"archive_storage_backend_local": "Local File System",
"archive_storage_endpoint": "Endpoint",
"archive_storage_bucket": "Bucket",
"archive_storage_local_root": "Root Path",
"archive_storage_default_endpoint": "Default AWS S3",
"archive_storage_not_configured_alert": "Archive storage is not configured in environment variables (ARCHIVE_STORAGE_BACKEND). Automatic archival cannot be enabled until archive storage is set.",
"auto_archive_card": "Automatic Asset Archival",
"auto_archive_card_description": "Automatically transfer aging files to archive storage to optimize primary storage usage.",
"enable_auto_archive": "Enable Auto Archive",
"enable_auto_archive_description": "Automatically scan and archive assets in this team that meet the age criteria.",
"auto_archive_method": "Archive Criteria",
"auto_archive_method_description": "Choose whether asset age is evaluated from creation time or last modification time.",
"auto_archive_method_not_updated": "Not modified for specified days",
"auto_archive_method_after_created": "After creation for specified days",
"auto_archive_days": "Age Threshold (days)",
"auto_archive_days_description": "Assets older than this number of days will be moved to archive storage.",
"auto_archive_post_restore_grace_days": "Post-Restore Grace Period (days)",
"auto_archive_post_restore_grace_days_description": "After an asset is restored from archive, wait at least this many days before allowing it to be auto-archived again. This should be smaller than the age threshold; only assets that exceed the age threshold and have also passed this grace period since restoration will be auto-archived.",
"auto_archive_disabled_hint": "Archive storage must be configured on the server before auto archive can be enabled.",
"auto_archive_settings_saved": "Auto archive settings saved successfully",
"auto_archive_settings_save_failed": "Failed to save auto archive settings",
"failed_to_load_storage_settings": "Failed to load storage settings",
"retry": "Retry",
"gotenberg_settings": "Gotenberg Document Converter",
"gotenberg_settings_description": "Configure the external Gotenberg service for converting Office documents, Markdown, and HTML to PDF.",
"gotenberg_server_url": "Server URL",
+32
View File
@@ -274,6 +274,38 @@
"turntable_testing": "正在测试...",
"integrations": "集成",
"integrations_settings_description": "配置用于媒体渲染与文档处理的第三方服务集成。",
"storage": "存储",
"storage_settings": "存储设置",
"storage_settings_description": "查看归档存储状态并配置资产自动归档策略。",
"archive_storage_config_card": "归档存储配置",
"archive_storage_config_card_description": "通过服务端环境变量配置的当前系统归档存储后端信息。",
"archive_storage_configured": "已配置",
"archive_storage_not_configured": "未配置",
"archive_storage_backend": "存储后端",
"archive_storage_backend_s3": "Amazon S3 / S3 兼容存储",
"archive_storage_backend_local": "本地文件系统",
"archive_storage_endpoint": "终端节点",
"archive_storage_bucket": "存储桶",
"archive_storage_local_root": "根路径",
"archive_storage_default_endpoint": "默认 AWS S3",
"archive_storage_not_configured_alert": "服务端环境变量中未配置归档存储(ARCHIVE_STORAGE_BACKEND)。在配置归档存储前无法启用自动归档。",
"auto_archive_card": "资产自动归档",
"auto_archive_card_description": "自动将达到一定时间的原始文件转移至归档存储,以优化主存储空间。",
"enable_auto_archive": "启用自动归档",
"enable_auto_archive_description": "自动扫描并归档本团队中符合时间条件的资产。",
"auto_archive_method": "归档判定条件",
"auto_archive_method_description": "选择根据文件的创建时间还是最近修改时间来判定资产年龄。",
"auto_archive_method_not_updated": "指定天数内未修改",
"auto_archive_method_after_created": "创建后达到指定天数",
"auto_archive_days": "时间阈值(天)",
"auto_archive_days_description": "超出此天数的资产将被转移至归档存储。",
"auto_archive_post_restore_grace_days": "恢复后宽限期(天)",
"auto_archive_post_restore_grace_days_description": "从归档恢复资产后,至少等待指定天数后才允许再次被自动归档。此值应小于时间阈值,实际被自动归档的资产需同时满足创建时间超过时间阈值且恢复后已超出宽限期。",
"auto_archive_disabled_hint": "必须在服务端配置归档存储后才能启用自动归档。",
"auto_archive_settings_saved": "自动归档设置保存成功",
"auto_archive_settings_save_failed": "保存自动归档设置失败",
"failed_to_load_storage_settings": "加载存储设置失败",
"retry": "重试",
"gotenberg_settings": "Gotenberg 文档转换服务",
"gotenberg_settings_description": "配置用于将 Office 文档、Markdown 及 HTML 转换为 PDF 的外部 Gotenberg 服务。",
"gotenberg_server_url": "服务地址",