1
0
Fork 0

Fix job count api

This commit is contained in:
Chocobozzz 2018-02-07 12:47:56 +01:00
parent 649fb0829a
commit 18cfac83a1
No known key found for this signature in database
GPG key ID: 583A612D890159BE

View file

@ -83,7 +83,7 @@ class JobQueue {
listForApi (state: JobState, start: number, count: number, sort: string) {
return new Promise<kue.Job[]>((res, rej) => {
kue.Job.rangeByState(state, start, start + count, sort, (err, jobs) => {
kue.Job.rangeByState(state, start, start + count - 1, sort, (err, jobs) => {
if (err) return rej(err)
return res(jobs)