mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-09 09:50:16 +08:00
Retry logs
This commit is contained in:
parent
38f68f9a82
commit
ce00c7ad65
@ -85,14 +85,21 @@ object CuiCloud {
|
|||||||
val bytes = file.readBytes()
|
val bytes = file.readBytes()
|
||||||
|
|
||||||
runBlocking {
|
runBlocking {
|
||||||
retryCatching(50) {
|
var first = true
|
||||||
|
retryCatching(1000) {
|
||||||
|
if (!first) {
|
||||||
|
println()
|
||||||
|
println()
|
||||||
|
println("Upload failed. Waiting 15s")
|
||||||
|
delay(15_000)
|
||||||
|
}
|
||||||
|
first = false
|
||||||
uploadToCuiCloud(
|
uploadToCuiCloud(
|
||||||
cuiCloudUrl,
|
cuiCloudUrl,
|
||||||
key,
|
key,
|
||||||
"/mirai/${project.name}/${file.nameWithoutExtension}.mp4",
|
"/mirai/${project.name}/${file.nameWithoutExtension}.mp4",
|
||||||
bytes
|
bytes
|
||||||
)
|
)
|
||||||
delay(30_000)
|
|
||||||
}.getOrThrow()
|
}.getOrThrow()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user