mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-26 16:03:42 +01:00
Allow modifying IP retention period
To allow IP addresses to not be stored for an entire year. This attempts to fix https://github.com/mastodon/mastodon/issues/6474 for Catstodon.
This commit is contained in:
parent
06b9e14a03
commit
97d03110ed
3 changed files with 10 additions and 2 deletions
|
@ -286,6 +286,14 @@ MAX_POLL_OPTION_CHARS=100
|
|||
MAX_EMOJI_SIZE=51200
|
||||
MAX_REMOTE_EMOJI_SIZE=204800
|
||||
|
||||
# IP retention period
|
||||
# If undefined, the value of 31556952 (1 average year) will be used.
|
||||
# Keep in mind that this is period will not be completely accurate
|
||||
# and may have a delay of up to 24 hours on vanilla and glitch-soc Mastodon
|
||||
# due to the scheduling of ip_cleanup_scheduler in sidekiq.yml.
|
||||
# Time unit in seconds
|
||||
IP_RETENTION_PERIOD=31556952
|
||||
|
||||
# Optional hCaptcha support
|
||||
# HCAPTCHA_SECRET_KEY=
|
||||
# HCAPTCHA_SITE_KEY=
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
class Scheduler::IpCleanupScheduler
|
||||
include Sidekiq::Worker
|
||||
|
||||
IP_RETENTION_PERIOD = 1.year.freeze
|
||||
IP_RETENTION_PERIOD = ENV.fetch('IP_RETENTION_PERIOD', 1.year).to_i.freeze
|
||||
|
||||
sidekiq_options retry: 0
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
class: Scheduler::UserCleanupScheduler
|
||||
queue: scheduler
|
||||
ip_cleanup_scheduler:
|
||||
cron: '<%= Random.rand(0..59) %> <%= Random.rand(3..5) %> * * *'
|
||||
every: '1h'
|
||||
class: Scheduler::IpCleanupScheduler
|
||||
queue: scheduler
|
||||
email_scheduler:
|
||||
|
|
Loading…
Reference in a new issue