aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-02-07 12:47:56 +0100
committerChocobozzz <me@florianbigard.com>2018-02-08 09:52:57 +0100
commit18cfac83a18102273880e8817e0603f020c23d21 (patch)
tree212516bdc972713b858ad1a748c5f882e2e45b91 /server
parent649fb0829a0735eae9938cdedd8573b5f4bc5100 (diff)
downloadPeerTube-18cfac83a18102273880e8817e0603f020c23d21.tar.gz
PeerTube-18cfac83a18102273880e8817e0603f020c23d21.tar.zst
PeerTube-18cfac83a18102273880e8817e0603f020c23d21.zip
Fix job count api
Diffstat (limited to 'server')
-rw-r--r--server/lib/job-queue/job-queue.ts2
1 files changed, 1 insertions, 1 deletions
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 {
83 83
84 listForApi (state: JobState, start: number, count: number, sort: string) { 84 listForApi (state: JobState, start: number, count: number, sort: string) {
85 return new Promise<kue.Job[]>((res, rej) => { 85 return new Promise<kue.Job[]>((res, rej) => {
86 kue.Job.rangeByState(state, start, start + count, sort, (err, jobs) => { 86 kue.Job.rangeByState(state, start, start + count - 1, sort, (err, jobs) => {
87 if (err) return rej(err) 87 if (err) return rej(err)
88 88
89 return res(jobs) 89 return res(jobs)