diff --git a/server/lib/job-queue/job-queue.ts b/server/lib/job-queue/job-queue.ts index 521d609cb..d9d7a6e42 100644 --- a/server/lib/job-queue/job-queue.ts +++ b/server/lib/job-queue/job-queue.ts @@ -83,7 +83,7 @@ class JobQueue { listForApi (state: JobState, start: number, count: number, sort: string) { return new Promise((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)