diff --git a/services/web/scripts/translations/upload.js b/services/web/scripts/translations/upload.js index 3a2034ceed..942222add1 100644 --- a/services/web/scripts/translations/upload.js +++ b/services/web/scripts/translations/upload.js @@ -40,11 +40,24 @@ async function pollUploadStatus(importId) { } } -async function main() { +async function uploadOnce() { const importId = await uploadLocales() 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 => { console.error({ error }) process.exit(1)