diff --git a/main.js b/main.js index 05e9fbc..7729cf0 100644 --- a/main.js +++ b/main.js @@ -21,7 +21,7 @@ var express = require('express'), pm2 = require('pm2'), cluster = require('cluster'), numCPUs = require('os').cpus().length, - coincli = require('./private/coincli.js'), + //coincli = require('./private/coincli.js'), ipc = require('electron').ipcMain; Promise = require('bluebird'); @@ -41,6 +41,7 @@ var shepherd = require('./routes/shepherd'), if (appConfig.killIguanaOnStart) { var iguanaGrep; + if (os.platform() === 'darwin') { iguanaGrep = "ps -p $(ps -A | grep -m1 iguana | awk '{print $1}') | grep -i iguana"; } @@ -53,7 +54,7 @@ if (appConfig.killIguanaOnStart) { exec(iguanaGrep, function(error, stdout, stderr) { if (stdout.indexOf('iguana') > -1) { console.log('found another iguana process(es)'); - var pkillCmd = os.platform() === 'win32' ? 'taskkill /f /im iguana.exe' : 'pkill -9 iguana'; + const pkillCmd = os.platform() === 'win32' ? 'taskkill /f /im iguana.exe' : 'pkill -9 iguana'; exec(pkillCmd, function(error, stdout, stderr) { console.log(pkillCmd + ' is issued'); diff --git a/routes/cache.js b/routes/cache.js index 882aa26..68bbfdc 100644 --- a/routes/cache.js +++ b/routes/cache.js @@ -141,6 +141,8 @@ cache.groomDelete = function(req, res, next) { if (_filename) { if (fs.existsSync(cache.iguanaDir + '/shepherd/cache-' + _filename + '.json')) { + inMemCache = {}; + fs.unlink(cache.iguanaDir + '/shepherd/cache-' + _filename + '.json', function(err) { if (err) { const errorObj = { @@ -746,7 +748,8 @@ cache.one = function(req, res, next) { 'method': 'cache-one', 'status': 'in progress', 'iguanaAPI': { - 'totalStackLength': callStack[coin] + 'totalStackLength': callStack[coin], + 'currentStackLength': callStack[coin] } } } diff --git a/routes/shepherd.js b/routes/shepherd.js index b72dac3..759dd92 100644 --- a/routes/shepherd.js +++ b/routes/shepherd.js @@ -23,7 +23,7 @@ Promise = require('bluebird'); const fixPath = require('fix-path'); var ps = require('ps-node'), setconf = require('../private/setconf.js'), - coincli = require('../private/coincli.js'), + //coincli = require('../private/coincli.js'), assetChainPorts = require('./ports.js') shepherd = express.Router(), iguanaInstanceRegistry = {};