diff --git a/src/app_state.rs b/src/app_state.rs index 00ace09..effebae 100644 --- a/src/app_state.rs +++ b/src/app_state.rs @@ -96,11 +96,13 @@ impl AppState { let filelist = get_s3_filelist(&self.storj_client, &self.storj_bucket).await; for [filename, filepath] in filelist.clone() { + if !filepath.starts_with("/development") { // Сохраняем список файлов в Redis, используя HSET для каждого файла let _: () = redis .hset(PATH_MAPPING_KEY, filename.clone(), filepath) .await .expect(&format!("Failed to cache file {} in Redis", filename)); + } } info!("cached {} files", filelist.len()); diff --git a/src/handlers/serve_file.rs b/src/handlers/serve_file.rs index 7b607d5..e4a522f 100644 --- a/src/handlers/serve_file.rs +++ b/src/handlers/serve_file.rs @@ -13,7 +13,7 @@ pub async fn serve_file(filepath: &str, state: &AppState) -> Result