Fix job count api
This commit is contained in:
parent
649fb0829a
commit
18cfac83a1
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue