fix(server): support Rust 1.85 audio cleanup
This commit is contained in:
@@ -824,9 +824,8 @@ async fn discard_audio_segment(
|
|||||||
.await?;
|
.await?;
|
||||||
transaction.commit().await?;
|
transaction.commit().await?;
|
||||||
|
|
||||||
if let Err(error) = tokio::fs::remove_file(&segment.audio_path).await
|
if let Err(error) = tokio::fs::remove_file(&segment.audio_path).await {
|
||||||
&& error.kind() != std::io::ErrorKind::NotFound
|
if error.kind() != std::io::ErrorKind::NotFound {
|
||||||
{
|
|
||||||
tracing::warn!(
|
tracing::warn!(
|
||||||
event = "audio_storage_delete_failed",
|
event = "audio_storage_delete_failed",
|
||||||
feedback_session_id = %segment.feedback_session_id,
|
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"
|
"discarded audio file could not be removed from storage"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
tracing::info!(
|
tracing::info!(
|
||||||
event = "failed_transcription_discarded",
|
event = "failed_transcription_discarded",
|
||||||
feedback_session_id = %segment.feedback_session_id,
|
feedback_session_id = %segment.feedback_session_id,
|
||||||
|
|||||||
Reference in New Issue
Block a user