mirror of https://github.com/Chocobozzz/PeerTube
Fix job queue api
parent
83452a1f23
commit
fafc13fff1
|
@ -83,7 +83,7 @@ class JobQueue {
|
||||||
|
|
||||||
listForApi (state: JobState, start: number, count: number, sort: string) {
|
listForApi (state: JobState, start: number, count: number, sort: string) {
|
||||||
return new Promise<kue.Job[]>((res, rej) => {
|
return new Promise<kue.Job[]>((res, rej) => {
|
||||||
kue.Job.rangeByState(state, start, count, sort, (err, jobs) => {
|
kue.Job.rangeByState(state, start, start + count, sort, (err, jobs) => {
|
||||||
if (err) return rej(err)
|
if (err) return rej(err)
|
||||||
|
|
||||||
return res(jobs)
|
return res(jobs)
|
||||||
|
|
Loading…
Reference in New Issue