Conflicts:
- `app/models/media_attachment.rb`:
Upstream moved hardcoded values around, while in glitch-soc they are
configurable.
Moved them like upstream, but keeping glitch-soc's ability to configure
them through env vars.
@ -9,15 +9,17 @@ class Admin::Metrics::Measure::TagServersMeasure < Admin::Metrics::Measure::Base
'tag_servers'
end
deftotal
protected
defperform_total_query
tag.statuses.where('statuses.id BETWEEN ? AND ?',Mastodon::Snowflake.id_at(@start_at,with_random:false),Mastodon::Snowflake.id_at(@end_at,with_random:false)).joins(:account).count('distinct accounts.domain')
end
defprevious_total
defperform_previous_total_query
tag.statuses.where('statuses.id BETWEEN ? AND ?',Mastodon::Snowflake.id_at(@start_at-length_of_period,with_random:false),Mastodon::Snowflake.id_at(@end_at-length_of_period,with_random:false)).joins(:account).count('distinct accounts.domain')
end
def data
defperform_data_query
sql=<<-SQL.squish
SELECTaxis.*,(
SELECTcount(distinctaccounts.domain)ASvalue
@ -38,8 +40,6 @@ class Admin::Metrics::Measure::TagServersMeasure < Admin::Metrics::Measure::Base