Fix job count api

pull/285/head
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
1 changed files with 1 additions and 1 deletions

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)