feature/v32-tokens
Edward Shen 2021-05-22 23:10:34 -04:00
parent 5fd8e86d97
commit 579d316945
Signed by: edward
GPG Key ID: 19182661E818369F
3 changed files with 5 additions and 2 deletions

1
src/cache/disk.rs vendored
View File

@ -174,6 +174,7 @@ async fn db_listener(
};
let mut size_freed = 0;
#[allow(clippy::cast_sign_loss)]
for item in items {
size_freed += item.size as u64;
tokio::spawn(remove_file(item.id));

View File

@ -35,7 +35,9 @@ pub static REQUESTS_OTHER_COUNTER: Lazy<IntCounter> = Lazy::new(|| {
.unwrap()
});
#[allow(clippy::shadow_unrelated)]
pub fn init() {
// we just need to initialize these, getting the values registers them.
let _a = CACHE_HIT_COUNTER.get();
let _a = CACHE_MISS_COUNTER.get();
let _a = REQUESTS_TOTAL_COUNTER.get();

View File

@ -109,10 +109,10 @@ pub async fn default(state: Data<RwLockServerState>, req: HttpRequest) -> impl R
return ServerResponse::HttpResponse(
ErrorNotFound("Path is not valid in offline mode").into(),
);
} else {
info!("Got unknown path, just proxying: {}", path);
}
info!("Got unknown path, just proxying: {}", path);
let resp = match HTTP_CLIENT.get(path).send().await {
Ok(resp) => resp,
Err(e) => {