diff --git a/js/server/modules/org/arangodb/cluster.js b/js/server/modules/org/arangodb/cluster.js index e0ac0ced50..937bbe0e0b 100644 --- a/js/server/modules/org/arangodb/cluster.js +++ b/js/server/modules/org/arangodb/cluster.js @@ -715,13 +715,16 @@ var wait = function (data, shards) { var status = result.status; if (status === "ERROR") { - raiseError(arangodb.errors.ERROR_INTERNAL.code, "received an error from a DB server"); + raiseError(arangodb.errors.ERROR_INTERNAL.code, + "received an error from a DB server"); } else if (status === "TIMEOUT") { - raiseError(arangodb.errors.ERROR_CLUSTER_TIMEOUT.code, arangodb.errors.ERROR_CLUSTER_TIMEOUT.message); + raiseError(arangodb.errors.ERROR_CLUSTER_TIMEOUT.code, + arangodb.errors.ERROR_CLUSTER_TIMEOUT.message); } else if (status === "DROPPED") { - raiseError(arangodb.errors.ERROR_INTERNAL.code, "the operation was dropped"); + raiseError(arangodb.errors.ERROR_INTERNAL.code, + "the operation was dropped"); } else if (status === "RECEIVED") { received.push(result); @@ -736,10 +739,12 @@ var wait = function (data, shards) { body = JSON.parse(result.body); } catch (err) { - raiseError(arangodb.errors.ERROR_INTERNAL.code, "received an error from a DB server"); + raiseError(arangodb.errors.ERROR_INTERNAL.code, + "received an error from a DB server"); } - raiseError(body.errorNum, body.errorMessage); + raiseError(body.errorNum, + body.errorMessage); } } } diff --git a/js/server/modules/org/arangodb/cluster/dispatcher.js b/js/server/modules/org/arangodb/cluster/dispatcher.js index ea02007957..7d583c67c1 100644 --- a/js/server/modules/org/arangodb/cluster/dispatcher.js +++ b/js/server/modules/org/arangodb/cluster/dispatcher.js @@ -60,7 +60,7 @@ function getAddr (endpoint) { actions.startAgent = function (dispatchers, cmd) { var agentDataDir = fs.join(cmd.dataPath, - "agent"+cmd.agencyPrefix+cmd.extPort) + "agent"+cmd.agencyPrefix+cmd.extPort); if (fs.exists(agentDataDir)) { fs.removeDirectoryRecursive(agentDataDir,true); } @@ -98,6 +98,7 @@ actions.startLauncher = function (dispatchers, cmd) { }; function dispatch (startupPlan) { + var myname; if (!startupPlan.hasOwnProperty("myname")) { myname = "me"; } diff --git a/js/server/modules/org/arangodb/cluster/kickstarter.js b/js/server/modules/org/arangodb/cluster/kickstarter.js index 611e49fe10..e5b6a9fca1 100644 --- a/js/server/modules/org/arangodb/cluster/kickstarter.js +++ b/js/server/modules/org/arangodb/cluster/kickstarter.js @@ -78,8 +78,8 @@ // .coordinatorPorts a list ports to try to use for coordinators // -fs = require("fs"); -dispatch = require("org/arangodb/cluster/dispatcher").dispatch; +var fs = require("fs"); +var dispatch = require("org/arangodb/cluster/dispatcher").dispatch; // Our default configurations: