mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-07 22:37:54 +00:00
fix(rust): update some deps to build correctly on nightly
This commit is contained in:
parent
a0d56cd667
commit
873643153d
5 changed files with 228 additions and 108 deletions
|
|
@ -49,11 +49,11 @@ pub async fn logger(request: Request, next: Next) -> Response {
|
|||
);
|
||||
histogram!(
|
||||
"pk_http_requests",
|
||||
(elapsed as f64) / 1_000_f64,
|
||||
"method" => method.to_string(),
|
||||
"route" => endpoint.clone(),
|
||||
"status" => response.status().to_string()
|
||||
);
|
||||
)
|
||||
.record((elapsed as f64) / 1_000_f64);
|
||||
|
||||
if elapsed > MIN_LOG_TIME {
|
||||
warn!(
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use axum::{
|
|||
response::Response,
|
||||
};
|
||||
use fred::{pool::RedisPool, prelude::LuaInterface, types::ReconnectPolicy, util::sha1_hash};
|
||||
use metrics::increment_counter;
|
||||
use metrics::counter;
|
||||
use tracing::{debug, error, info, warn};
|
||||
|
||||
use crate::util::{header_or_unknown, json_err};
|
||||
|
|
@ -165,7 +165,7 @@ pub async fn do_request_ratelimited(
|
|||
} else {
|
||||
let retry_after = (retry_after * 1_000_f64).ceil() as u64;
|
||||
debug!("ratelimited request from {rl_key}, retry_after={retry_after}",);
|
||||
increment_counter!("pk_http_requests_ratelimited");
|
||||
counter!("pk_http_requests_ratelimited").increment(1);
|
||||
json_err(
|
||||
StatusCode::TOO_MANY_REQUESTS,
|
||||
format!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue