feat: propagate photo creation success/failure
This commit is contained in:
parent
7d9df01eab
commit
70b72dc27b
1 changed files with 2 additions and 2 deletions
|
|
@ -703,9 +703,9 @@ function createPhoto(name, data, dir) {
|
|||
function updatePhotos(dir, photoPairs) {
|
||||
const dirname = path.join(dir)
|
||||
_.attempt(() => makeDir.sync(dirname))
|
||||
return Promise.all(
|
||||
return Promise.allSettled(
|
||||
photoPairs.map(([filename, data]) => createPhoto(filename, data, dirname)),
|
||||
)
|
||||
).then(savedPhotos => savedPhotos.map(res => res.status === 'fulfilled'))
|
||||
}
|
||||
|
||||
let pendingRecordPings = new Map()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue