mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
build scripts: retrying whole OkHttp call for jps cache upload
GitOrigin-RevId: bb93c10c67fc53e3aa2cb36c84138012de4f2e28
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e6475ac05d
commit
6359a7eeb5
+10
-9
@@ -176,17 +176,18 @@ private class Uploader(serverUrl: String) {
|
||||
check(Files.exists(file)) {
|
||||
"The file $file does not exist"
|
||||
}
|
||||
retryWithExponentialBackOff {
|
||||
httpClient.newCall(Request.Builder().url(url)
|
||||
.put(object : RequestBody() {
|
||||
override fun contentType() = MEDIA_TYPE_BINARY
|
||||
|
||||
val call = httpClient.newCall(Request.Builder().url(url).put(object : RequestBody() {
|
||||
override fun contentType() = MEDIA_TYPE_BINARY
|
||||
override fun contentLength() = Files.size(file)
|
||||
|
||||
override fun contentLength() = Files.size(file)
|
||||
|
||||
override fun writeTo(sink: BufferedSink) {
|
||||
file.source().use(sink::writeAll)
|
||||
}
|
||||
}).build())
|
||||
retryWithExponentialBackOff { call.execute().useSuccessful {} }
|
||||
override fun writeTo(sink: BufferedSink) {
|
||||
file.source().use(sink::writeAll)
|
||||
}
|
||||
}).build()).execute().useSuccessful {}
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user