fix: realtime user analytics (#5129)

This commit is contained in:
Vrishab Srivatsa
2024-07-02 15:51:08 +05:30
committed by GitHub
parent a343f69dc4
commit 5d86002ce7
6 changed files with 33 additions and 7 deletions

View File

@ -668,6 +668,7 @@ impl AnalyticsProvider {
metric: &ActivePaymentsMetrics,
merchant_id: &str,
publishable_key: &str,
time_range: &TimeRange,
) -> types::MetricsResult<
Vec<(
ActivePaymentsMetricsBucketIdentifier,
@ -678,12 +679,12 @@ impl AnalyticsProvider {
Self::Sqlx(_pool) => Err(report!(MetricsError::NotImplemented)),
Self::Clickhouse(pool) => {
metric
.load_metrics(merchant_id, publishable_key, pool)
.load_metrics(merchant_id, publishable_key, time_range, pool)
.await
}
Self::CombinedCkh(_sqlx_pool, ckh_pool) | Self::CombinedSqlx(_sqlx_pool, ckh_pool) => {
metric
.load_metrics(merchant_id, publishable_key, ckh_pool)
.load_metrics(merchant_id, publishable_key, time_range, ckh_pool)
.await
}
}