From 2572ce9664fb57c2d5c307c1bcbb95408052c6cf Mon Sep 17 00:00:00 2001 From: Alan Plum Date: Wed, 27 May 2015 12:50:42 +0200 Subject: [PATCH] Style. --- js/server/modules/org/arangodb/foxx/queues.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/js/server/modules/org/arangodb/foxx/queues.js b/js/server/modules/org/arangodb/foxx/queues.js index 1b7741f976..726e30fb15 100644 --- a/js/server/modules/org/arangodb/foxx/queues.js +++ b/js/server/modules/org/arangodb/foxx/queues.js @@ -203,7 +203,6 @@ function Queue(name) { _.extend(Queue.prototype, { push: function (name, data, opts) { - var type, result, now; if (typeof name !== 'string') { throw new Error('Must pass a job type!'); } @@ -215,11 +214,11 @@ _.extend(Queue.prototype, { if (!jobTypeCache[dbName]) { jobTypeCache[dbName] = {}; } - type = jobTypeCache[dbName][name]; + var type = jobTypeCache[dbName][name]; if (type !== undefined) { if (type.schema) { - result = type.schema.validate(data); + var result = type.schema.validate(data); if (result.error) { throw result.error; } @@ -234,7 +233,7 @@ _.extend(Queue.prototype, { throw new Error('Unknown job type: ' + name); } resetQueueControl(); - now = Date.now(); + var now = Date.now(); return db._jobs.save({ status: 'pending', queue: this.name,