From 51fae45cce554526352005e7ff9dff8a49c26fe6 Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 29 Mar 2019 14:57:53 +0100 Subject: [PATCH] add notes re: logging and cold storage --- expire-channels.js | 2 +- storage/file.js | 4 ++-- storage/tasks.js | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/expire-channels.js b/expire-channels.js index a42a3af58..f7597b323 100644 --- a/expire-channels.js +++ b/expire-channels.js @@ -60,7 +60,7 @@ var handleTask = function (str, path, cb) { } }).nThen(function () { // remove the task file... - Fs.unlink(path, function (err) { + Fs.unlink(path, function (err) { // FIXME deletion if (err) { console.error(err); } cb(); }); diff --git a/storage/file.js b/storage/file.js index 882b1614d..46ae366a6 100644 --- a/storage/file.js +++ b/storage/file.js @@ -68,7 +68,7 @@ var closeChannel = function (env, channelName, cb) { } }; -var clearChannel = function (env, channelId, cb) { +var clearChannel = function (env, channelId, cb) { // FIXME deletion var path = mkPath(env, channelId); getMetadataAtPath(env, path, function (e, metadata) { if (e) { return cb(new Error(e)); } @@ -200,7 +200,7 @@ var checkPath = function (path, callback) { }); }; -var removeChannel = function (env, channelName, cb) { +var removeChannel = function (env, channelName, cb) { // FIXME deletion var filename = mkPath(env, channelName); Fs.unlink(filename, cb); }; diff --git a/storage/tasks.js b/storage/tasks.js index aee820f87..982b7520a 100644 --- a/storage/tasks.js +++ b/storage/tasks.js @@ -67,6 +67,10 @@ var write = function (env, task, cb) { }); }; +// TODO implement a standard API for removing tasks +// currently they are deleted manually in 'expire-channels.js' +// var remove = function (env, id, cb) { }; + Tasks.create = function (config, cb) { var env = { root: config.taskPath || './tasks',