mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-24 03:43:42 +01:00
Reduce user active duration from 7 days to 2 days (#8282)
To minimize fanout work and redis home feed storage space when there are lots of recent sign-ups
This commit is contained in:
parent
19b07ba260
commit
59c68c1a74
1 changed files with 8 additions and 1 deletions
|
@ -42,7 +42,14 @@ class User < ApplicationRecord
|
|||
include Settings::Extend
|
||||
include Omniauthable
|
||||
|
||||
ACTIVE_DURATION = 7.days
|
||||
# The home and list feeds will be stored in Redis for this amount
|
||||
# of time, and status fan-out to followers will include only people
|
||||
# within this time frame. Lowering the duration may improve performance
|
||||
# if lots of people sign up, but not a lot of them check their feed
|
||||
# every day. Raising the duration reduces the amount of expensive
|
||||
# RegenerationWorker jobs that need to be run when those people come
|
||||
# to check their feed
|
||||
ACTIVE_DURATION = ENV.fetch('USER_ACTIVE_DAYS', 7).to_i.days
|
||||
|
||||
devise :two_factor_authenticatable,
|
||||
otp_secret_encryption_key: Rails.configuration.x.otp_secret
|
||||
|
|
Loading…
Reference in a new issue