perf: optimize backend — HTTP client, DB queries, error handling, and config cleanup
Some checks failed
CI / lint-and-build (push) Failing after 2m55s

This commit is contained in:
2026-04-08 10:50:40 +03:00
parent 28aa4ef8cc
commit 50214fec0f
15 changed files with 126 additions and 32 deletions

View File

@@ -13,7 +13,7 @@ pub async fn export_csv(
let mut wtr = csv::Writer::from_writer(file);
wtr.write_record(&columns)
.map_err(|e| TuskError::Custom(e.to_string()))?;
.map_err(|e| TuskError::Export(e.to_string()))?;
for row in &rows {
let record: Vec<String> = row
@@ -27,10 +27,10 @@ pub async fn export_csv(
})
.collect();
wtr.write_record(&record)
.map_err(|e| TuskError::Custom(e.to_string()))?;
.map_err(|e| TuskError::Export(e.to_string()))?;
}
wtr.flush().map_err(|e| TuskError::Custom(e.to_string()))?;
wtr.flush().map_err(|e| TuskError::Export(e.to_string()))?;
Ok(())
}