Change hashtag trends to be stored in the database instead of redis (#32837)
Co-authored-by: David Roetzel <david@roetzel.de>
This commit is contained in:
parent
b9b26490e7
commit
48ea7552dd
18 changed files with 195 additions and 157 deletions
|
@ -11,9 +11,9 @@
|
|||
= link_to tag_path(tag), target: '_blank', rel: 'noopener noreferrer' do
|
||||
= t('admin.trends.tags.used_by_over_week', count: tag.history.reduce(0) { |sum, day| sum + day.accounts })
|
||||
|
||||
- if tag.trendable? && (rank = Trends.tags.rank(tag.id))
|
||||
- if tag.trendable?
|
||||
·
|
||||
%abbr{ title: t('admin.trends.tags.current_score', score: Trends.tags.score(tag.id)) }= t('admin.trends.tags.trending_rank', rank: rank + 1)
|
||||
%abbr{ title: t('admin.trends.tags.current_score', score: tag.trend.score) }= t('admin.trends.tags.trending_rank', rank: tag.trend.rank + 1)
|
||||
|
||||
- if tag.decaying?
|
||||
·
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<% new_trending_tags.each do |tag| %>
|
||||
- #<%= tag.display_name %>
|
||||
<%= raw t('admin.trends.tags.usage_comparison', today: tag.history.get(Time.now.utc).accounts, yesterday: tag.history.get(Time.now.utc - 1.day).accounts) %> · <%= t('admin.trends.tags.current_score', score: Trends.tags.score(tag.id).round(2)) %>
|
||||
<%= raw t('admin.trends.tags.usage_comparison', today: tag.history.get(Time.now.utc).accounts, yesterday: tag.history.get(Time.now.utc - 1.day).accounts) %> · <%= t('admin.trends.tags.current_score', score: tag.trend.score.round(2)) %>
|
||||
<% end %>
|
||||
|
||||
<%= raw t('application_mailer.view')%> <%= admin_trends_tags_url(status: 'pending_review') %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue