aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/jobs
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/jobs')
-rw-r--r--server/lib/jobs/handlers/video-transcoder.ts2
-rw-r--r--server/lib/jobs/job-scheduler.ts6
2 files changed, 4 insertions, 4 deletions
diff --git a/server/lib/jobs/handlers/video-transcoder.ts b/server/lib/jobs/handlers/video-transcoder.ts
index 35db5fb96..43599356a 100644
--- a/server/lib/jobs/handlers/video-transcoder.ts
+++ b/server/lib/jobs/handlers/video-transcoder.ts
@@ -1,4 +1,4 @@
1const db = require('../../../initializers/database') 1import { database as db } from '../../../initializers/database'
2import { logger } from '../../../helpers' 2import { logger } from '../../../helpers'
3import { addVideoToFriends } from '../../../lib' 3import { addVideoToFriends } from '../../../lib'
4 4
diff --git a/server/lib/jobs/job-scheduler.ts b/server/lib/jobs/job-scheduler.ts
index 7b8c6faf9..ad5f7f6d9 100644
--- a/server/lib/jobs/job-scheduler.ts
+++ b/server/lib/jobs/job-scheduler.ts
@@ -1,6 +1,6 @@
1import { forever, queue } from 'async' 1import { forever, queue } from 'async'
2 2
3const db = require('../../initializers/database') 3import { database as db } from '../../initializers/database'
4import { 4import {
5 JOBS_FETCHING_INTERVAL, 5 JOBS_FETCHING_INTERVAL,
6 JOBS_FETCH_LIMIT_PER_CYCLE, 6 JOBS_FETCH_LIMIT_PER_CYCLE,
@@ -24,7 +24,7 @@ class JobScheduler {
24 24
25 logger.info('Jobs scheduler activated.') 25 logger.info('Jobs scheduler activated.')
26 26
27 const jobsQueue = queue(this.processJob) 27 const jobsQueue = queue(this.processJob.bind(this))
28 28
29 // Finish processing jobs from a previous start 29 // Finish processing jobs from a previous start
30 const state = JOB_STATES.PROCESSING 30 const state = JOB_STATES.PROCESSING
@@ -58,7 +58,7 @@ class JobScheduler {
58 }) 58 })
59 } 59 }
60 60
61 createJob (transaction, handlerName, handlerInputData, callback) { 61 createJob (transaction, handlerName: string, handlerInputData: object, callback) {
62 const createQuery = { 62 const createQuery = {
63 state: JOB_STATES.PENDING, 63 state: JOB_STATES.PENDING,
64 handlerName, 64 handlerName,