1
0
Fork 0

adding more error handling

pull/1700/head
Vallie Joseph 2024-04-01 20:21:01 +00:00
parent 84d3cef541
commit 96ef8d5d33
1 changed files with 8 additions and 3 deletions

View File

@ -43,9 +43,14 @@ export async function createZipUploadStream(
zip.on('finish', zipFinishCallback)
zip.on('end', zipEndCallback)
// see https://caolan.github.io/async/v3/docs.html#queue for options
const fileUploadQueue = async.queue(function (task, callback) {
core.debug(`adding file to upload queue ${task}`)
const fileUploadQueue = async.queue(function (fileItem, callback) {
try {
core.debug(`adding ${fileItem} to the file queue`)
callback()
} catch (err) {
core.error(`task experienced an error: ${fileItem} ${err}`)
callback(err)
}
}) // concurrency for uploads automatically set to 1
fileUploadQueue.error(function (err, task) {