Swallow and log errors
This commit is contained in:
parent
351ba66989
commit
be2b9b5b13
|
|
@ -1,3 +1,6 @@
|
|||
import { getLogger } from '@sitespeed.io/log';
|
||||
const log = getLogger('sitespeedio.plugin.s3');
|
||||
|
||||
export async function runWithConcurrencyLimit(tasks, limit) {
|
||||
async function worker() {
|
||||
while (tasks.length > 0) {
|
||||
|
|
@ -5,7 +8,7 @@ export async function runWithConcurrencyLimit(tasks, limit) {
|
|||
try {
|
||||
await task();
|
||||
} catch (error) {
|
||||
throw error;
|
||||
log.error('Could not finish upload task', error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue