aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/jobs/job-scheduler.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/jobs/job-scheduler.ts')
-rw-r--r--server/lib/jobs/job-scheduler.ts6
1 files changed, 3 insertions, 3 deletions
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,