1
0

Optimize analytics queries (#781)

* Optimize analytics queries

* fix clippy
This commit is contained in:
Geometrically
2023-12-04 18:49:51 -07:00
committed by GitHub
parent 27055b96e3
commit 4630d175d7
11 changed files with 83 additions and 1095 deletions

View File

@@ -16,7 +16,6 @@ use sqlx::PgPool;
use std::collections::HashMap;
use std::net::Ipv4Addr;
use std::sync::Arc;
use uuid::Uuid;
pub fn config(cfg: &mut web::ServiceConfig) {
cfg.service(
@@ -103,7 +102,6 @@ pub async fn count_download(
.unwrap_or_else(|_| Ipv4Addr::new(127, 0, 0, 1).to_ipv6_mapped());
analytics_queue.add_download(Download {
id: Uuid::new_v4(),
recorded: get_current_tenths_of_ms(),
domain: url.host_str().unwrap_or_default().to_string(),
site_path: url.path().to_string(),