Use full snowflake range in admin/metrics classes (#29416)

This commit is contained in:
Matt Jankowski 2024-03-13 04:56:37 -04:00 committed by GitHub
parent 9754967d5f
commit 7e6eb64f1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 10 additions and 10 deletions

View File

@ -37,11 +37,11 @@ class Admin::Metrics::Dimension::InstanceLanguagesDimension < Admin::Metrics::Di
end end
def earliest_status_id def earliest_status_id
Mastodon::Snowflake.id_at(@start_at, with_random: false) Mastodon::Snowflake.id_at(@start_at.beginning_of_day, with_random: false)
end end
def latest_status_id def latest_status_id
Mastodon::Snowflake.id_at(@end_at, with_random: false) Mastodon::Snowflake.id_at(@end_at.end_of_day, with_random: false)
end end
def params def params

View File

@ -30,10 +30,10 @@ class Admin::Metrics::Dimension::ServersDimension < Admin::Metrics::Dimension::B
end end
def earliest_status_id def earliest_status_id
Mastodon::Snowflake.id_at(@start_at) Mastodon::Snowflake.id_at(@start_at.beginning_of_day, with_random: false)
end end
def latest_status_id def latest_status_id
Mastodon::Snowflake.id_at(@end_at) Mastodon::Snowflake.id_at(@end_at.end_of_day, with_random: false)
end end
end end

View File

@ -40,11 +40,11 @@ class Admin::Metrics::Dimension::TagLanguagesDimension < Admin::Metrics::Dimensi
end end
def earliest_status_id def earliest_status_id
Mastodon::Snowflake.id_at(@start_at, with_random: false) Mastodon::Snowflake.id_at(@start_at.beginning_of_day, with_random: false)
end end
def latest_status_id def latest_status_id
Mastodon::Snowflake.id_at(@end_at, with_random: false) Mastodon::Snowflake.id_at(@end_at.end_of_day, with_random: false)
end end
def params def params

View File

@ -40,11 +40,11 @@ class Admin::Metrics::Dimension::TagServersDimension < Admin::Metrics::Dimension
end end
def earliest_status_id def earliest_status_id
Mastodon::Snowflake.id_at(@start_at, with_random: false) Mastodon::Snowflake.id_at(@start_at.beginning_of_day, with_random: false)
end end
def latest_status_id def latest_status_id
Mastodon::Snowflake.id_at(@end_at, with_random: false) Mastodon::Snowflake.id_at(@end_at.end_of_day, with_random: false)
end end
def params def params

View File

@ -51,11 +51,11 @@ class Admin::Metrics::Measure::InstanceStatusesMeasure < Admin::Metrics::Measure
end end
def earliest_status_id def earliest_status_id
Mastodon::Snowflake.id_at(@start_at, with_random: false) Mastodon::Snowflake.id_at(@start_at.beginning_of_day, with_random: false)
end end
def latest_status_id def latest_status_id
Mastodon::Snowflake.id_at(@end_at, with_random: false) Mastodon::Snowflake.id_at(@end_at.end_of_day, with_random: false)
end end
def time_period def time_period