about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-09-27 03:08:19 +0200
committerGitHub <noreply@github.com>2022-09-27 03:08:19 +0200
commit5c9abdeff1d0cf3e14d84c5ae298e6a5beccaf18 (patch)
treeb4bad153eec9f2a39d96a9da342e1618ac43740b /config
parent3e0999cd1139d638332d62129dbf0b37263802fd (diff)
Add retention policy for cached content and media (#19232)
Diffstat (limited to 'config')
-rw-r--r--config/locales/simple_form.en.yml8
-rw-r--r--config/settings.yml1
-rw-r--r--config/sidekiq.yml16
3 files changed, 11 insertions, 14 deletions
diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml
index ddc83e896..db5b45e41 100644
--- a/config/locales/simple_form.en.yml
+++ b/config/locales/simple_form.en.yml
@@ -73,6 +73,10 @@ en:
         actions:
           hide: Completely hide the filtered content, behaving as if it did not exist
           warn: Hide the filtered content behind a warning mentioning the filter's title
+      form_admin_settings:
+        backups_retention_period: Keep generated user archives for the specified number of days.
+        content_cache_retention_period: Posts from other servers will be deleted after the specified number of days when set to a positive value. This may be irreversible.
+        media_cache_retention_period: Downloaded media files will be deleted after the specified number of days when set to a positive value, and re-downloaded on demand.
       form_challenge:
         current_password: You are entering a secure area
       imports:
@@ -207,6 +211,10 @@ en:
         actions:
           hide: Hide completely
           warn: Hide with a warning
+      form_admin_settings:
+        backups_retention_period: User archive retention period
+        content_cache_retention_period: Content cache retention period
+        media_cache_retention_period: Media cache retention period
       interactions:
         must_be_follower: Block notifications from non-followers
         must_be_following: Block notifications from people you don't follow
diff --git a/config/settings.yml b/config/settings.yml
index eaa05071e..41742118b 100644
--- a/config/settings.yml
+++ b/config/settings.yml
@@ -70,6 +70,7 @@ defaults: &defaults
   show_domain_blocks: 'disabled'
   show_domain_blocks_rationale: 'disabled'
   require_invite_text: false
+  backups_retention_period: 7
 
 development:
   <<: *defaults
diff --git a/config/sidekiq.yml b/config/sidekiq.yml
index 9ec6eb5ec..e3156aa34 100644
--- a/config/sidekiq.yml
+++ b/config/sidekiq.yml
@@ -25,22 +25,14 @@
     every: '5m'
     class: Scheduler::IndexingScheduler
     queue: scheduler
-  media_cleanup_scheduler:
+  vacuum_scheduler:
     cron: '<%= Random.rand(0..59) %> <%= Random.rand(3..5) %> * * *'
-    class: Scheduler::MediaCleanupScheduler
-    queue: scheduler
-  feed_cleanup_scheduler:
-    cron: '<%= Random.rand(0..59) %> <%= Random.rand(0..2) %> * * *'
-    class: Scheduler::FeedCleanupScheduler
+    class: Scheduler::VacuumScheduler
     queue: scheduler
   follow_recommendations_scheduler:
     cron: '<%= Random.rand(0..59) %> <%= Random.rand(6..9) %> * * *'
     class: Scheduler::FollowRecommendationsScheduler
     queue: scheduler
-  doorkeeper_cleanup_scheduler:
-    cron: '<%= Random.rand(0..59) %> <%= Random.rand(0..2) %> * * 0'
-    class: Scheduler::DoorkeeperCleanupScheduler
-    queue: scheduler
   user_cleanup_scheduler:
     cron: '<%= Random.rand(0..59) %> <%= Random.rand(4..6) %> * * *'
     class: Scheduler::UserCleanupScheduler
@@ -49,10 +41,6 @@
     cron: '<%= Random.rand(0..59) %> <%= Random.rand(3..5) %> * * *'
     class: Scheduler::IpCleanupScheduler
     queue: scheduler
-  backup_cleanup_scheduler:
-    cron: '<%= Random.rand(0..59) %> <%= Random.rand(3..5) %> * * *'
-    class: Scheduler::BackupCleanupScheduler
-    queue: scheduler
   pghero_scheduler:
     cron: '0 0 * * *'
     class: Scheduler::PgheroScheduler