Add occasional random fetches to article page_views_count (#1625)
This commit is contained in:
parent
300291ed70
commit
ff405c0e90
1 changed files with 2 additions and 2 deletions
|
|
@ -36,7 +36,7 @@ class ArticleAnalyticsFetcher
|
|||
|
||||
def should_fetch(article)
|
||||
return true if @context == "force"
|
||||
|
||||
article.positive_reactions_count > article.previous_positive_reactions_count
|
||||
# Mostly fetch if positive reactions count has gone up, but occasionally re-fetch anyway.
|
||||
article.positive_reactions_count > article.previous_positive_reactions_count || rand(25) == 1
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue