Workaround to bullmq undefined jobs

pull/6026/head
Chocobozzz 2023-10-18 15:46:18 +02:00
parent ea01bf0167
commit 3546128f95
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 5 additions and 1 deletions

View File

@ -418,7 +418,11 @@ class JobQueue {
continue continue
} }
const jobs = await queue.getJobs(states, 0, start + count, asc) let jobs = await queue.getJobs(states, 0, start + count, asc)
// FIXME: we have sometimes undefined values https://github.com/taskforcesh/bullmq/issues/248
jobs = jobs.filter(j => !!j)
results = results.concat(jobs) results = results.concat(jobs)
} }