diff options
author | Chocobozzz <me@florianbigard.com> | 2018-02-27 17:42:32 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-02-27 17:42:32 +0100 |
commit | 628d28e84ba49f4214cfe4946cbaf0a9f799929a (patch) | |
tree | 5d92bf8a153d7c3c4b7d46fae49581719b89b90e /server/lib/job-queue | |
parent | c90f0614e6edaae4939e521605a65fe186c37442 (diff) | |
download | PeerTube-628d28e84ba49f4214cfe4946cbaf0a9f799929a.tar.gz PeerTube-628d28e84ba49f4214cfe4946cbaf0a9f799929a.tar.zst PeerTube-628d28e84ba49f4214cfe4946cbaf0a9f799929a.zip |
Fix typings
Diffstat (limited to 'server/lib/job-queue')
-rw-r--r-- | server/lib/job-queue/job-queue.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/job-queue/job-queue.ts b/server/lib/job-queue/job-queue.ts index b0ccbd59c..66cced59a 100644 --- a/server/lib/job-queue/job-queue.ts +++ b/server/lib/job-queue/job-queue.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import * as kue from 'kue' | 1 | import * as kue from 'kue' |
2 | import { JobType, JobState } from '../../../shared/models' | 2 | import { JobState, JobType } from '../../../shared/models' |
3 | import { logger } from '../../helpers/logger' | 3 | import { logger } from '../../helpers/logger' |
4 | import { CONFIG, JOB_ATTEMPTS, JOB_COMPLETED_LIFETIME, JOB_CONCURRENCY } from '../../initializers' | 4 | import { CONFIG, JOB_ATTEMPTS, JOB_COMPLETED_LIFETIME, JOB_CONCURRENCY } from '../../initializers' |
5 | import { Redis } from '../redis' | 5 | import { Redis } from '../redis' |
@@ -87,7 +87,7 @@ class JobQueue { | |||
87 | }) | 87 | }) |
88 | } | 88 | } |
89 | 89 | ||
90 | async listForApi (state: JobState, start: number, count: number, sort: 'ASC' | 'DESC') { | 90 | async listForApi (state: JobState, start: number, count: number, sort: 'ASC' | 'DESC'): Promise<kue.Job[]> { |
91 | const jobStrings = await Redis.Instance.listJobs(this.jobRedisPrefix, state, 'alpha', sort, start, count) | 91 | const jobStrings = await Redis.Instance.listJobs(this.jobRedisPrefix, state, 'alpha', sort, start, count) |
92 | 92 | ||
93 | const jobPromises = jobStrings | 93 | const jobPromises = jobStrings |
@@ -149,7 +149,7 @@ class JobQueue { | |||
149 | } | 149 | } |
150 | 150 | ||
151 | private getJob (id: number) { | 151 | private getJob (id: number) { |
152 | return new Promise((res, rej) => { | 152 | return new Promise<kue.Job>((res, rej) => { |
153 | kue.Job.get(id, (err, job) => { | 153 | kue.Job.get(id, (err, job) => { |
154 | if (err) return rej(err) | 154 | if (err) return rej(err) |
155 | 155 | ||