Use full snowflake range in `admin/metrics` classes (#29416)
This commit is contained in:
parent
9754967d5f
commit
7e6eb64f1e
|
@ -37,11 +37,11 @@ class Admin::Metrics::Dimension::InstanceLanguagesDimension < Admin::Metrics::Di
|
|||
end
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
def params
|
||||
|
|
|
@ -30,10 +30,10 @@ class Admin::Metrics::Dimension::ServersDimension < Admin::Metrics::Dimension::B
|
|||
end
|
||||
|
||||
def earliest_status_id
|
||||
Mastodon::Snowflake.id_at(@start_at)
|
||||
Mastodon::Snowflake.id_at(@start_at.beginning_of_day, with_random: false)
|
||||
end
|
||||
|
||||
def latest_status_id
|
||||
Mastodon::Snowflake.id_at(@end_at)
|
||||
Mastodon::Snowflake.id_at(@end_at.end_of_day, with_random: false)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -40,11 +40,11 @@ class Admin::Metrics::Dimension::TagLanguagesDimension < Admin::Metrics::Dimensi
|
|||
end
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
def params
|
||||
|
|
|
@ -40,11 +40,11 @@ class Admin::Metrics::Dimension::TagServersDimension < Admin::Metrics::Dimension
|
|||
end
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
def params
|
||||
|
|
|
@ -51,11 +51,11 @@ class Admin::Metrics::Measure::InstanceStatusesMeasure < Admin::Metrics::Measure
|
|||
end
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
def time_period
|
||||
|
|
Loading…
Reference in New Issue