Retry originals uploads

master
Manuel Kasper 2022-09-02 16:26:12 +02:00
rodzic 8fff8411e6
commit e3587c2394
2 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -9,7 +9,7 @@ module.exports = () => {
const start = Date.now()
const child = child_process.fork('jobs/' + cronjob.script)
child.on('error', err => {
console.error(`Job '${cronjob.script}' failed: ${err}`)
console.error(`[ALERT] Job '${cronjob.script}' failed: ${err}`)
})
child.on('close', code => {
const end = Date.now()

Wyświetl plik

@ -113,7 +113,11 @@ function uploadToCloud(storageConfig, targetPath, buffer) {
}
return minioClient.putObject(storageConfig.bucketName, targetPath, buffer, metadata)
.catch(err => {
console.error('Cloud photo upload failed: ' + err)
// Try again
return minioClient.putObject(storageConfig.bucketName, targetPath, buffer, metadata)
.catch(err => {
console.error('[ALERT] Cloud photo upload failed: ' + err)
})
})
}