From a16d7171ad2cdcc3427c3ac173836fd6dd9c4bda Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 25 Jun 2019 16:31:21 +0200 Subject: [PATCH] add some more notes --- historyKeeper.js | 9 +++++++++ storage/file.js | 3 +-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/historyKeeper.js b/historyKeeper.js index 169b14ffb..01786c6e4 100644 --- a/historyKeeper.js +++ b/historyKeeper.js @@ -581,6 +581,15 @@ module.exports.create = function (cfg) { if (msg[3] === 'CLEAR_OWNED_CHANNEL') { onChannelCleared(ctx, msg[4]); } + + // FIXME METADATA + /* + if (msg[3] === 'SET_METADATA') { // or whatever we call the RPC???? + + } + + */ + sendMsg(ctx, user, [0, HISTORY_KEEPER_ID, 'MSG', user.id, JSON.stringify([parsed[0]].concat(output))]); }); } catch (e) { diff --git a/storage/file.js b/storage/file.js index f7484a340..285f64dd0 100644 --- a/storage/file.js +++ b/storage/file.js @@ -197,7 +197,6 @@ const mkOffsetCounter = () => { const readMessagesBin = (env, id, start, msgHandler, cb) => { const stream = Fs.createReadStream(mkPath(env, id), { start: start }); - // TODO get the channel and add the atime let keepReading = true; Pull( ToPull.read(stream), @@ -213,7 +212,6 @@ const readMessagesBin = (env, id, start, msgHandler, cb) => { }; var checkPath = function (path, callback) { - // TODO check if we actually need to use stat at all Fs.stat(path, function (err) { if (!err) { callback(undefined, true); @@ -314,6 +312,7 @@ var listChannels = function (root, handler, cb) { // move a channel's log file from its current location // to an equivalent location in the cold storage directory var archiveChannel = function (env, channelName, cb) { + // TODO close channels before archiving them? if (!env.retainData) { return void cb("ARCHIVES_DISABLED"); }