debloat-logs

This commit is contained in:
2024-10-22 09:52:05 +03:00
parent 74b1be650f
commit 1385f64824
2 changed files with 18 additions and 18 deletions

View File

@@ -189,8 +189,8 @@ impl AppState {
let parts: Vec<&str> = key.split('.').collect();
let storj_filekey = parts.first().and_then(|s| s.split('/').last()).unwrap_or(parts.first().unwrap());
if storj_filekey.is_empty() && !storj_filekey.ends_with("/") {
eprint!("[ERROR] empty filename: {}\n", key);
if storj_filekey.is_empty() && !storj_filekey.ends_with('/') {
eprint!("empty filename: {}\n", key);
} else {
// Проверяем, существует ли файл на Storj S3
match check_file_exists(&self.storj_client, &self.storj_bucket, &storj_filekey).await
@@ -200,7 +200,7 @@ impl AppState {
if let Err(e) =
self.save_aws2storj_mapping(&key, &storj_filekey).await
{
eprintln!("[ERROR] save {}: {:?}", key, e);
eprintln!("save {}: {:?}", key, e);
} else {
println!("[ok] {}", key);
}
@@ -210,7 +210,7 @@ impl AppState {
}
Err(e) => {
eprintln!(
"[ERROR] check {}: {:?}",
"check {}: {:?}",
storj_filekey, e
);
}
@@ -223,7 +223,7 @@ impl AppState {
}
}
Err(e) => {
eprintln!("[ERROR] get AWS S3 file list: {:?}", e);
eprintln!("get AWS S3 file list: {:?}", e);
}
}
}