1
0
Fork 0

fixed JSLint warnings

This commit is contained in:
Jan Steemann 2014-02-04 17:12:41 +01:00
parent ce9136cbfa
commit 1df92a97b4
3 changed files with 14 additions and 8 deletions

View File

@ -715,13 +715,16 @@ var wait = function (data, shards) {
var status = result.status; var status = result.status;
if (status === "ERROR") { 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") { 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") { 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") { else if (status === "RECEIVED") {
received.push(result); received.push(result);
@ -736,10 +739,12 @@ var wait = function (data, shards) {
body = JSON.parse(result.body); body = JSON.parse(result.body);
} }
catch (err) { 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);
} }
} }
} }

View File

@ -60,7 +60,7 @@ function getAddr (endpoint) {
actions.startAgent = function (dispatchers, cmd) { actions.startAgent = function (dispatchers, cmd) {
var agentDataDir = fs.join(cmd.dataPath, var agentDataDir = fs.join(cmd.dataPath,
"agent"+cmd.agencyPrefix+cmd.extPort) "agent"+cmd.agencyPrefix+cmd.extPort);
if (fs.exists(agentDataDir)) { if (fs.exists(agentDataDir)) {
fs.removeDirectoryRecursive(agentDataDir,true); fs.removeDirectoryRecursive(agentDataDir,true);
} }
@ -98,6 +98,7 @@ actions.startLauncher = function (dispatchers, cmd) {
}; };
function dispatch (startupPlan) { function dispatch (startupPlan) {
var myname;
if (!startupPlan.hasOwnProperty("myname")) { if (!startupPlan.hasOwnProperty("myname")) {
myname = "me"; myname = "me";
} }

View File

@ -78,8 +78,8 @@
// .coordinatorPorts a list ports to try to use for coordinators // .coordinatorPorts a list ports to try to use for coordinators
// //
fs = require("fs"); var fs = require("fs");
dispatch = require("org/arangodb/cluster/dispatcher").dispatch; var dispatch = require("org/arangodb/cluster/dispatcher").dispatch;
// Our default configurations: // Our default configurations: