Fixed worker job for cyrillyc names
Build and Publish / Build and Publish Docker Image (push) Successful in 2m35s

This commit is contained in:
2026-05-24 15:08:56 +03:00
parent 9fc141378e
commit b958d4521e
6 changed files with 34 additions and 8 deletions
+2 -1
View File
@@ -128,7 +128,8 @@ fn extract_tags(tags: &[symphonia::core::meta::Tag], meta: &mut RawMetadata) {
}
StandardTagKey::Date | StandardTagKey::OriginalDate => {
if meta.year.is_none() {
meta.year = value[..4.min(value.len())].parse().ok();
let year_prefix: String = value.chars().take(4).collect();
meta.year = year_prefix.parse().ok();
}
}
StandardTagKey::Genre => {
+1 -1
View File
@@ -85,7 +85,7 @@ pub async fn probe_llm(
let body_text = resp.text().await.unwrap_or_default();
return AgentProbeResult {
latency_ms,
error: format!("HTTP {status}: {}", &body_text[..body_text.len().min(300)]),
error: format!("HTTP {status}: {}", body_text.chars().take(300).collect::<String>()),
..Default::default()
};
}
+3 -2
View File
@@ -90,7 +90,8 @@ async fn call_llm_chat(
if !resp.status().is_success() {
let status = resp.status();
let body = resp.text().await.unwrap_or_default();
tracing::error!(%status, body = &body[..body.len().min(500)], "LLM API error");
let body_preview: String = body.chars().take(500).collect();
tracing::error!(%status, body = %body_preview, "LLM API error");
anyhow::bail!("LLM returned {}: {}", status, body);
}
@@ -440,7 +441,7 @@ fn parse_batch_response(
anyhow::anyhow!(
"Failed to parse batch LLM response: {} — raw: {}",
e,
&response[..response.len().min(500)]
response.chars().take(500).collect::<String>()
)
})?;