From 4eb6bcd92b9afddbcc87cd174231e546bfe07f0c Mon Sep 17 00:00:00 2001 From: cgeek <cem.moreau@gmail.com> Date: Mon, 14 Dec 2015 13:38:44 +0100 Subject: [PATCH] Some refactoring for issue #257 --- app/lib/dal/fileDAL.js | 1 - app/lib/dal/fileDALs/statDAL.js | 8 -------- 2 files changed, 9 deletions(-) diff --git a/app/lib/dal/fileDAL.js b/app/lib/dal/fileDAL.js index a361789c3..1e34ed150 100644 --- a/app/lib/dal/fileDAL.js +++ b/app/lib/dal/fileDAL.js @@ -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() { diff --git a/app/lib/dal/fileDALs/statDAL.js b/app/lib/dal/fileDALs/statDAL.js index 02f859607..d4a4de970 100644 --- a/app/lib/dal/fileDALs/statDAL.js +++ b/app/lib/dal/fileDALs/statDAL.js @@ -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()) || {}; -- GitLab