fix(server): support Rust 1.85 audio cleanup

This commit is contained in:
zhangheng
2026-07-22 16:12:01 +08:00
parent 146e78e335
commit e4fddbf6f9

View File

@@ -824,9 +824,8 @@ async fn discard_audio_segment(
.await?;
transaction.commit().await?;
if let Err(error) = tokio::fs::remove_file(&segment.audio_path).await
&& error.kind() != std::io::ErrorKind::NotFound
{
if let Err(error) = tokio::fs::remove_file(&segment.audio_path).await {
if error.kind() != std::io::ErrorKind::NotFound {
tracing::warn!(
event = "audio_storage_delete_failed",
feedback_session_id = %segment.feedback_session_id,
@@ -836,6 +835,7 @@ async fn discard_audio_segment(
"discarded audio file could not be removed from storage"
);
}
}
tracing::info!(
event = "failed_transcription_discarded",
feedback_session_id = %segment.feedback_session_id,