Mention video id when failing to send/upload video
This commit is contained in:
parent
8c2db3c958
commit
76dfd825f3
|
@ -679,34 +679,40 @@ pub async fn upload_worker(
|
||||||
.mime_type("video/x-matroska")
|
.mime_type("video/x-matroska")
|
||||||
.file(uploaded);
|
.file(uploaded);
|
||||||
if let Err(err) = tclient.send_message(&chat, message).await {
|
if let Err(err) = tclient.send_message(&chat, message).await {
|
||||||
eprintln!("Failed to send video: {:?}", err);
|
eprintln!("Failed to send video {}: {:?}", &video_id, err);
|
||||||
if let Err(err) = tclient
|
if let Err(err) = tclient
|
||||||
.send_message(
|
.send_message(
|
||||||
&chat,
|
&chat,
|
||||||
InputMessage::text("Failed to send video, see logs"),
|
InputMessage::text(&format!(
|
||||||
|
"Failed to send video {}, see logs",
|
||||||
|
&video_id
|
||||||
|
)),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
eprintln!(
|
eprintln!(
|
||||||
"Failed to send message about failing to send video: {:?}",
|
"Failed to send message about failing to send video {}: {:?}",
|
||||||
err
|
&video_id, err
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
success = false;
|
success = false;
|
||||||
eprintln!("Failed to upload video: {:?}", err);
|
eprintln!("Failed to upload video {}: {:?}", &video_id, err);
|
||||||
if let Err(err) = tclient
|
if let Err(err) = tclient
|
||||||
.send_message(
|
.send_message(
|
||||||
&chat,
|
&chat,
|
||||||
InputMessage::text("Failed to upload video, see logs"),
|
InputMessage::text(&format!(
|
||||||
|
"Failed to upload video {}, see logs",
|
||||||
|
&video_id
|
||||||
|
)),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
eprintln!(
|
eprintln!(
|
||||||
"Failed to send message about failing to upload video: {:?}",
|
"Failed to send message about failing to upload video {}: {:?}",
|
||||||
err
|
&video_id, err
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue