aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/job-queue')
-rw-r--r--server/lib/job-queue/job-queue.ts6
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 @@
1import * as kue from 'kue' 1import * as kue from 'kue'
2import { JobType, JobState } from '../../../shared/models' 2import { JobState, JobType } from '../../../shared/models'
3import { logger } from '../../helpers/logger' 3import { logger } from '../../helpers/logger'
4import { CONFIG, JOB_ATTEMPTS, JOB_COMPLETED_LIFETIME, JOB_CONCURRENCY } from '../../initializers' 4import { CONFIG, JOB_ATTEMPTS, JOB_COMPLETED_LIFETIME, JOB_CONCURRENCY } from '../../initializers'
5import { Redis } from '../redis' 5import { 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