This commit is contained in:
parent
53ff37d66c
commit
22515cabb9
|
@ -124,8 +124,13 @@ class PrintServer {
|
||||||
jobs = [];
|
jobs = [];
|
||||||
for (let i = 0; i < conf.concurrency; i++) {
|
for (let i = 0; i < conf.concurrency; i++) {
|
||||||
const jobId = await this.getJob();
|
const jobId = await this.getJob();
|
||||||
if (jobId)
|
if (jobId) {
|
||||||
jobs.push(this.printJob(jobId));
|
const job = this.printJob(jobId);
|
||||||
|
// XXX: Workaround for Promise.all() unhandledRejection
|
||||||
|
// https://stackoverflow.com/questions/67789309/why-do-i-get-an-unhandled-promise-rejection-with-await-promise-all
|
||||||
|
job.catch(() => {});
|
||||||
|
jobs.push(job);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue