|
@@ -40,11 +40,24 @@ async function pollUploadStatus(importId) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-async function main() {
|
|
|
|
|
|
|
+async function uploadOnce() {
|
|
|
const importId = await uploadLocales()
|
|
const importId = await uploadLocales()
|
|
|
await pollUploadStatus(importId)
|
|
await pollUploadStatus(importId)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+async function main() {
|
|
|
|
|
+ try {
|
|
|
|
|
+ await uploadOnce()
|
|
|
|
|
+ } catch (err) {
|
|
|
|
|
+ console.error('--- upload failed once ---')
|
|
|
|
|
+ console.error(err)
|
|
|
|
|
+ console.error('--- upload failed once ---')
|
|
|
|
|
+ console.log('retrying upload in 30s')
|
|
|
|
|
+ await sleep(30_000)
|
|
|
|
|
+ await uploadOnce()
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
main().catch(error => {
|
|
main().catch(error => {
|
|
|
console.error({ error })
|
|
console.error({ error })
|
|
|
process.exit(1)
|
|
process.exit(1)
|