Adjust blackbox (#405)
This commit is contained in:
parent
9729bc8d0d
commit
cd33d96e10
1 changed files with 3 additions and 1 deletions
|
|
@ -3,8 +3,10 @@ class BlackBox
|
|||
return (article.featured_number|| 10000)/10000 unless Rails.env.production?
|
||||
reaction_points = article.reactions.sum(:points)
|
||||
recency_bonus = article.published_at > 12.hours.ago ? 50 : 0
|
||||
today_bonus = article.published_at > 36.hours.ago ? 250 : 0
|
||||
FunctionCaller.new("blackbox-production-articleHotness",
|
||||
{article: article, user: article.user}.to_json).call + reaction_points + recency_bonus
|
||||
{article: article, user: article.user}.to_json).call +
|
||||
reaction_points + recency_bonus + today_bonus
|
||||
end
|
||||
|
||||
def self.comment_quality_score(comment)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue