From 44d4fd1bb856569b9bc226e95b576107bfb9320e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Thu, 7 Jan 2016 19:16:39 +0100 Subject: [PATCH] Minor improvement in job runner creation --- batch/job_runner.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/batch/job_runner.js b/batch/job_runner.js index 3088a3cf..ace9ba15 100644 --- a/batch/job_runner.js +++ b/batch/job_runner.js @@ -11,14 +11,13 @@ function JobRunner(metadataBackend, userDatabaseMetadataService) { this.metadataBackend = metadataBackend; this.userDatabaseMetadataService = userDatabaseMetadataService; this.jobPublisher = new JobPublisher(); - + this.jobQueue = new JobQueue(this.metadataBackend); + this.userIndexer = new UserIndexer(this.metadataBackend); } JobRunner.prototype.run = function (job_id) { var self = this; - var jobQueue = new JobQueue(this.metadataBackend); - var userIndexer = new UserIndexer(this.metadataBackend); - var jobBackend = new JobBackend(this.metadataBackend, jobQueue, this.jobPublisher, userIndexer); + var jobBackend = new JobBackend(this.metadataBackend, this.jobQueue, this.jobPublisher, this.userIndexer); jobBackend.get(job_id, function (err, job) { if (err) {