Skip to content
Snippets Groups Projects
Commit 12a16e62 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[add] new `--reset-data` option to fully reset Monit's local data (blockchain)

parent 062e0b7b
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,8 @@ module.exports = {
},
cliOptions: [
{ value: '--monitor', desc: 'Enable performance monitoring of DB access'}
{ value: '--monitor', desc: 'Enable performance monitoring of DB access'},
{ value: '--reset-data', desc: 'Forces Monit to reset its indexed data on startup'},
],
cli: [{
......
......@@ -48,7 +48,7 @@ module.exports = (duniterServer, host, port, appParente, program) => co(function
console.log("module currency-monit started");
// Specialized node's UI
let httpServer = webserver(host, port, appParente, duniterServer, monitDatasPath, offset, cache);
let httpServer = webserver(host, port, appParente, duniterServer, monitDatasPath, offset, cache, program.resetData);
yield httpServer.openConnection();
})
......
......@@ -16,7 +16,7 @@ const bodyParser = require('body-parser');
const routes = require(__dirname + '/../routes');
const tpl = require(__dirname + '/tplit.js');
module.exports = (host: any, port: any, appParente: any, duniterServer: Server, monitDatasPath: any, offset: any, cache: any, resetData: boolean = false) => {
module.exports = (host: any, port: any, appParente: any, duniterServer: Server, monitDatasPath: any, offset: any, cache: any, resetData: boolean) => {
var app = express();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment