Merge remote-tracking branch 'origin/feature/bounded-retention' into shigusegubu-new

This commit is contained in:
Henry Jameson 2026-11-05 18:01:42 +02:00
commit d9e75192ad
13 changed files with 1340 additions and 42 deletions

View file

@ -622,7 +622,8 @@ config :pleroma, Oban,
crontab: [
{"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker},
{"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker},
{"*/10 * * * *", Pleroma.Workers.Cron.AppCleanupWorker}
{"*/10 * * * *", Pleroma.Workers.Cron.AppCleanupWorker},
{"0 * * * *", Pleroma.Workers.Cron.RetentionWorker}
]
config :pleroma, Pleroma.Formatter,
@ -931,6 +932,12 @@ config :web_push_encryption, http_client: Pleroma.HTTP.WebPush
config :pleroma, :instances_favicons, enabled: false
config :pleroma, :retention,
enabled: false,
max_objects: nil,
batch_size: 50_000,
keep_non_public: false
config :floki, :html_parser, Floki.HTMLParser.FastHtml
config :pleroma, Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.PleromaAuthenticator

View file

@ -3331,6 +3331,42 @@ config :pleroma, :config_description, [
}
]
},
%{
group: :pleroma,
key: :retention,
type: :group,
description:
"Bounded retention: continuously evict old remote threads nobody local interacted with." <>
" Local posts and threads with local interactions are always kept.",
children: [
%{
key: :enabled,
type: :boolean,
description: "Run the retention worker from the Oban crontab"
},
%{
key: :max_objects,
type: :integer,
description:
"Optional watermark. When the objects table is estimated to hold more rows than this," <>
" the oldest unpinned remote threads quiet for more than a day are evicted, whatever the retention period.",
suggestions: [nil, 1_000_000]
},
%{
key: :batch_size,
type: :integer,
description:
"Number of activities the worker walks per run; their threads are checked and evicted." <>
" Default: 50000.",
suggestions: [50_000]
},
%{
key: :keep_non_public,
type: :boolean,
description: "Also keep threads that contain non-public posts"
}
]
},
%{
group: :ex_aws,
key: :s3,