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

Some refactoring for issue #257

parent af869764
No related branches found
No related tags found
No related merge requests found
......@@ -1182,7 +1182,6 @@ function FileDAL(profile, home, localDir, myFS, parentFileDAL, dalName, loki) {
this.loadStats = that.statDAL.loadStats;
this.getStat = that.statDAL.getStat;
this.saveStat = that.statDAL.saveStat;
this.pushStats = that.statDAL.pushStats;
this.needsSave = function() {
......
......@@ -21,14 +21,6 @@ function StatDAL(rootPath, qioFS, parentCore, localDAL, AbstractStorage) {
this.getStat = (statName) => that.loadStats().then((stats) => (stats && stats[statName]) || { statName: statName, blocks: [], lastParsedBlock: -1 });
this.saveStat = (stat, name) => {
return co(function *() {
var stats = (yield that.loadStats()) || {};
stats[name] = stat;
return that.coreFS.writeJSON('stats.json', stats);
});
};
this.pushStats = (statsToPush) => {
return co(function *() {
var stats = (yield that.loadStats()) || {};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment