This commit is contained in:
parent
53ff37d66c
commit
22515cabb9
|
@ -124,8 +124,13 @@ class PrintServer {
|
|||
jobs = [];
|
||||
for (let i = 0; i < conf.concurrency; i++) {
|
||||
const jobId = await this.getJob();
|
||||
if (jobId)
|
||||
jobs.push(this.printJob(jobId));
|
||||
if (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
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue