mirror of https://github.com/actions/toolkit
adding more error handling
parent
84d3cef541
commit
96ef8d5d33
|
@ -43,9 +43,14 @@ export async function createZipUploadStream(
|
||||||
zip.on('finish', zipFinishCallback)
|
zip.on('finish', zipFinishCallback)
|
||||||
zip.on('end', zipEndCallback)
|
zip.on('end', zipEndCallback)
|
||||||
// see https://caolan.github.io/async/v3/docs.html#queue for options
|
// see https://caolan.github.io/async/v3/docs.html#queue for options
|
||||||
const fileUploadQueue = async.queue(function (task, callback) {
|
const fileUploadQueue = async.queue(function (fileItem, callback) {
|
||||||
core.debug(`adding file to upload queue ${task}`)
|
try {
|
||||||
|
core.debug(`adding ${fileItem} to the file queue`)
|
||||||
callback()
|
callback()
|
||||||
|
} catch (err) {
|
||||||
|
core.error(`task experienced an error: ${fileItem} ${err}`)
|
||||||
|
callback(err)
|
||||||
|
}
|
||||||
}) // concurrency for uploads automatically set to 1
|
}) // concurrency for uploads automatically set to 1
|
||||||
|
|
||||||
fileUploadQueue.error(function (err, task) {
|
fileUploadQueue.error(function (err, task) {
|
||||||
|
|
Loading…
Reference in New Issue