Merge pull request #81 from cubedro/develop

Sleep only in production
This commit is contained in:
Marian OANCΞA 2015-04-17 02:10:50 +03:00
commit 3c44d5da1f
3 changed files with 6 additions and 3 deletions

4
app.js
View File

@ -1,5 +1,7 @@
var sleep = require('sleep');
sleep.sleep(15);
if(process.env.NODE_ENV === 'production')
sleep.sleep(15);
var nodeModel = require('./lib/node');

View File

@ -15,6 +15,7 @@ var ETH_VERSION,
NET_VERSION,
PROTOCOL_VERSION,
API_VERSION;
var INSTANCE_NAME = process.env.INSTANCE_NAME;
var Contract = null;
@ -58,7 +59,6 @@ function Node()
}
this.info = {
client: pjson.version,
name: INSTANCE_NAME || (process.env.EC2_INSTANCE_ID || os.hostname()),
contact: (process.env.CONTACT_DETAILS || ""),
node: ETH_VERSION,
@ -68,6 +68,7 @@ function Node()
port: (process.env.LISTENING_PORT || 30303),
os: os.platform(),
os_v: os.release(),
client: pjson.version
};
this.id = _.camelCase(this.info.name);

View File

@ -10,13 +10,13 @@
"dependencies": {
"debounce": "^1.0.0",
"debug": "~2.1.3",
"web3": "0.2.8",
"lodash": "^3.6.0",
"primus": "^3.0.2",
"primus-emit": "^0.1.2",
"primus-spark-latency": "^0.1.1",
"shelljs": "^0.4.0",
"sleep": "^2.0.0",
"web3": "0.2.8",
"ws": "^0.7.1"
},
"scripts": {