1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Separate tags / betweens

This commit is contained in:
Matt Jankowski 2024-06-11 11:38:42 -04:00
parent abe946296b
commit f3d9e61639

View file

@ -28,9 +28,13 @@ class Admin::Metrics::Measure::TagServersMeasure < Admin::Metrics::Measure::Base
.reorder(nil)
.joins(:tags, :account)
.where(
<<~SQL.squish, tag_id: tag.id, earliest_status_id: earliest_status_id, latest_status_id: latest_status_id
<<~SQL.squish, tag_id: tag.id
statuses_tags.tag_id = :tag_id
AND statuses.id BETWEEN :earliest_status_id AND :latest_status_id
SQL
)
.where(
<<~SQL.squish, earliest_status_id: earliest_status_id, latest_status_id: latest_status_id
statuses.id BETWEEN :earliest_status_id AND :latest_status_id
SQL
)
.where(daily_period(:statuses))