mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Throw for pool errors
This commit is contained in:
parent
5779b12e6a
commit
d4e5f1cdd1
1 changed files with 6 additions and 1 deletions
|
|
@ -245,7 +245,7 @@ class BuildLists {
|
|||
|
||||
const poolSize = 1000
|
||||
|
||||
await PromisePool
|
||||
const { errors } = await PromisePool
|
||||
.withConcurrency( poolSize )
|
||||
.for( Array.from( this.lists[listOptions.name] ) )
|
||||
.process(async ( listEntry, index, pool ) => {
|
||||
|
|
@ -287,6 +287,11 @@ class BuildLists {
|
|||
// Write the endpoint to JSON
|
||||
await this.saveToJson( listEntry, endpointPath )
|
||||
})
|
||||
|
||||
if ( errors.length !== 0 ) {
|
||||
throw new Error( errors )
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Save app lists to JSON
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue