kopia lustrzana https://github.com/manuelkasper/sotlas-api
Retry originals uploads
rodzic
8fff8411e6
commit
e3587c2394
|
@ -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()
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue