You've already forked AstralRinth
forked from didirus/AstralRinth
Optimize analytics queries (#781)
* Optimize analytics queries * fix clippy
This commit is contained in:
@@ -16,7 +16,6 @@ use std::collections::HashMap;
|
||||
use std::net::{AddrParseError, IpAddr, Ipv4Addr, Ipv6Addr};
|
||||
use std::sync::Arc;
|
||||
use url::Url;
|
||||
use uuid::Uuid;
|
||||
|
||||
pub const FILTERED_HEADERS: &[&str] = &[
|
||||
"authorization",
|
||||
@@ -107,7 +106,6 @@ pub async fn page_view_ingest(
|
||||
.unwrap_or_else(|_| Ipv4Addr::new(127, 0, 0, 1).to_ipv6_mapped());
|
||||
|
||||
let mut view = PageView {
|
||||
id: Uuid::new_v4(),
|
||||
recorded: get_current_tenths_of_ms(),
|
||||
domain: domain.to_string(),
|
||||
site_path: url.path().to_string(),
|
||||
@@ -203,7 +201,6 @@ pub async fn playtime_ingest(
|
||||
|
||||
if let Some(version) = versions.iter().find(|x| id == x.inner.id.into()) {
|
||||
analytics_queue.add_playtime(Playtime {
|
||||
id: Default::default(),
|
||||
recorded: get_current_tenths_of_ms(),
|
||||
seconds: playtime.seconds as u64,
|
||||
user_id: user.id.0,
|
||||
|
||||
Reference in New Issue
Block a user