mirror of
https://github.com/funamitech/mastodon
synced 2024-11-24 15:16:33 +09:00
Change half-life of trend decay (#11774)
This commit is contained in:
parent
d7ed697030
commit
a75009a65e
@ -7,8 +7,8 @@ class TrendingTags
|
||||
THRESHOLD = 5
|
||||
LIMIT = 10
|
||||
REVIEW_THRESHOLD = 3
|
||||
MAX_SCORE_COOLDOWN = 3.days.freeze
|
||||
MAX_SCORE_HALFLIFE = 6.hours.freeze
|
||||
MAX_SCORE_COOLDOWN = 2.days.freeze
|
||||
MAX_SCORE_HALFLIFE = 2.hours.freeze
|
||||
|
||||
class << self
|
||||
include Redisable
|
||||
@ -83,6 +83,7 @@ class TrendingTags
|
||||
# Trim older items
|
||||
|
||||
redis.zremrangebyrank(KEY, 0, -(LIMIT + 1))
|
||||
redis.zremrangebyscore(KEY, '(0.3', '-inf')
|
||||
end
|
||||
|
||||
def get(limit, filtered: true)
|
||||
|
Loading…
Reference in New Issue
Block a user