Browse Source

komodo cli stop code -1 fix

all-modes
pbca26 8 years ago
parent
commit
a7ac858e4b
  1. 20
      routes/shepherd.js

20
routes/shepherd.js

@ -166,7 +166,7 @@ function downloadFile(configuration) {
uri: configuration.remoteFile, uri: configuration.remoteFile,
agentOptions: { agentOptions: {
keepAlive: true, keepAlive: true,
keepAliveMsecs: 15000 keepAliveMsecs: 15000,
} }
}); });
@ -201,12 +201,12 @@ function downloadFile(configuration) {
const remoteBinLocation = { const remoteBinLocation = {
'win32': 'https://artifacts.supernet.org/latest/windows/', 'win32': 'https://artifacts.supernet.org/latest/windows/',
'darwin': 'https://artifacts.supernet.org/latest/osx/', 'darwin': 'https://artifacts.supernet.org/latest/osx/',
'linux': 'https://artifacts.supernet.org/latest/linux/' 'linux': 'https://artifacts.supernet.org/latest/linux/',
}; };
const localBinLocation = { const localBinLocation = {
'win32': 'assets/bin/win64/', 'win32': 'assets/bin/win64/',
'darwin': 'assets/bin/osx/', 'darwin': 'assets/bin/osx/',
'linux': 'assets/bin/linux64/' 'linux': 'assets/bin/linux64/',
}; };
const latestBins = { const latestBins = {
'win32': [ 'win32': [
@ -221,7 +221,7 @@ const latestBins = {
'libssl-1_1.dll', 'libssl-1_1.dll',
'libwinpthread-1.dll', 'libwinpthread-1.dll',
'nanomsg.dll', 'nanomsg.dll',
'pthreadvc2.dll' 'pthreadvc2.dll',
], ],
'darwin': [ 'darwin': [
'iguana', 'iguana',
@ -230,12 +230,12 @@ const latestBins = {
'libgcc_s.1.dylib', 'libgcc_s.1.dylib',
'libgomp.1.dylib', 'libgomp.1.dylib',
'libnanomsg.5.0.0.dylib', 'libnanomsg.5.0.0.dylib',
'libstdc++.6.dylib' // encode %2B 'libstdc++.6.dylib', // encode %2B
], ],
'linux': [ 'linux': [
'iguana', 'iguana',
'komodo-cli', 'komodo-cli',
'komodod' 'komodod',
] ]
}; };
@ -326,7 +326,7 @@ shepherd.get('/update/bins', function(req, res, next) {
'status': 'progress', 'status': 'progress',
'file': binsToUpdate[i].name, 'file': binsToUpdate[i].name,
'bytesTotal': total, 'bytesTotal': total,
'bytesReceived': received 'bytesReceived': received,
} }
}); });
console.log(binsToUpdate[i].name + ' ' + percentage + '% | ' + received + ' bytes out of ' + total + ' bytes.'); console.log(binsToUpdate[i].name + ' ' + percentage + '% | ' + received + ' bytes out of ' + total + ' bytes.');
@ -342,7 +342,7 @@ shepherd.get('/update/bins', function(req, res, next) {
'msg': { 'msg': {
'type': 'bins-update', 'type': 'bins-update',
'file': binsToUpdate[i].name, 'file': binsToUpdate[i].name,
'status': 'done' 'status': 'done',
} }
}); });
console.log('file ' + binsToUpdate[i].name + ' succesfully downloaded'); console.log('file ' + binsToUpdate[i].name + ' succesfully downloaded');
@ -351,7 +351,7 @@ shepherd.get('/update/bins', function(req, res, next) {
'msg': { 'msg': {
'type': 'bins-update', 'type': 'bins-update',
'file': binsToUpdate[i].name, 'file': binsToUpdate[i].name,
'message': 'size mismatch' 'message': 'size mismatch',
} }
}); });
console.log('error: ' + binsToUpdate[i].name + ' file size doesnt match remote!'); console.log('error: ' + binsToUpdate[i].name + ' file size doesnt match remote!');
@ -657,7 +657,7 @@ shepherd.quitKomodod = function() {
if (stdout.indexOf('stopping') > -1 || if (stdout.indexOf('stopping') > -1 ||
stdout.indexOf('EOF reached') > -1 || stdout.indexOf('EOF reached') > -1 ||
stdout.indexOf("coundn't connect to server") > -1) { stdout.indexOf('connect to server: unknown (code -1)') > -1) {
clearInterval(coindExitInterval[key]); clearInterval(coindExitInterval[key]);
} }

Loading…
Cancel
Save