lint
This commit is contained in:
parent
5b60a43466
commit
8815b5c8cd
@ -29,7 +29,7 @@ use ulid::Ulid;
|
|||||||
pub async fn query_user_stats<'a>(
|
pub async fn query_user_stats<'a>(
|
||||||
app: &'a Web3ProxyApp,
|
app: &'a Web3ProxyApp,
|
||||||
bearer: Option<TypedHeader<Authorization<Bearer>>>,
|
bearer: Option<TypedHeader<Authorization<Bearer>>>,
|
||||||
mut params: &'a HashMap<String, String>,
|
params: &'a HashMap<String, String>,
|
||||||
stat_response_type: StatType,
|
stat_response_type: StatType,
|
||||||
) -> Web3ProxyResponse {
|
) -> Web3ProxyResponse {
|
||||||
let (caller_user_id, _semaphore) = match bearer {
|
let (caller_user_id, _semaphore) = match bearer {
|
||||||
@ -51,7 +51,7 @@ pub async fn query_user_stats<'a>(
|
|||||||
let user_id: u64 = params
|
let user_id: u64 = params
|
||||||
.get("user_id")
|
.get("user_id")
|
||||||
.and_then(|x| x.parse::<u64>().ok())
|
.and_then(|x| x.parse::<u64>().ok())
|
||||||
.unwrap_or_else(|| caller_user_id);
|
.unwrap_or(caller_user_id);
|
||||||
|
|
||||||
let db_replica = app.db_replica()?;
|
let db_replica = app.db_replica()?;
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ use std::num::NonZeroU64;
|
|||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use std::sync::atomic::{self, Ordering};
|
use std::sync::atomic::{self, Ordering};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use tracing::{trace, warn};
|
use tracing::trace;
|
||||||
|
|
||||||
pub use stat_buffer::{SpawnedStatBuffer, StatBuffer};
|
pub use stat_buffer::{SpawnedStatBuffer, StatBuffer};
|
||||||
|
|
||||||
|
@ -8,8 +8,6 @@ use hashbrown::HashMap;
|
|||||||
use influxdb2::api::write::TimestampPrecision;
|
use influxdb2::api::write::TimestampPrecision;
|
||||||
use migration::sea_orm::prelude::Decimal;
|
use migration::sea_orm::prelude::Decimal;
|
||||||
use migration::sea_orm::DatabaseConnection;
|
use migration::sea_orm::DatabaseConnection;
|
||||||
use parking_lot::RwLock;
|
|
||||||
use std::sync::Arc;
|
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use tokio::sync::broadcast;
|
use tokio::sync::broadcast;
|
||||||
use tokio::time::interval;
|
use tokio::time::interval;
|
||||||
|
Loading…
Reference in New Issue
Block a user