diff options
author | Chocobozzz <me@florianbigard.com> | 2018-02-07 10:32:14 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-02-07 10:32:14 +0100 |
commit | fafc13fff164778161bb6bb0d3019e2b7a238243 (patch) | |
tree | 18a7df105adbfa96aaef3859d4ef4cf603357104 | |
parent | 83452a1f235074ba635cdc24ae527f1f06b066c1 (diff) | |
download | PeerTube-fafc13fff164778161bb6bb0d3019e2b7a238243.tar.gz PeerTube-fafc13fff164778161bb6bb0d3019e2b7a238243.tar.zst PeerTube-fafc13fff164778161bb6bb0d3019e2b7a238243.zip |
Fix job queue api
-rw-r--r-- | server/lib/job-queue/job-queue.ts | 2 |
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 e8f6c3620..521d609cb 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, count, sort, (err, jobs) => { | 86 | kue.Job.rangeByState(state, start, start + count, 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) |