add notes re: logging and cold storage

This commit is contained in:
ansuz 2019-03-29 14:57:53 +01:00
parent 0a1971cfee
commit 51fae45cce
3 changed files with 7 additions and 3 deletions

View File

@ -60,7 +60,7 @@ var handleTask = function (str, path, cb) {
} }
}).nThen(function () { }).nThen(function () {
// remove the task file... // remove the task file...
Fs.unlink(path, function (err) { Fs.unlink(path, function (err) { // FIXME deletion
if (err) { console.error(err); } if (err) { console.error(err); }
cb(); cb();
}); });

View File

@ -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); var path = mkPath(env, channelId);
getMetadataAtPath(env, path, function (e, metadata) { getMetadataAtPath(env, path, function (e, metadata) {
if (e) { return cb(new Error(e)); } 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); var filename = mkPath(env, channelName);
Fs.unlink(filename, cb); Fs.unlink(filename, cb);
}; };

View File

@ -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) { Tasks.create = function (config, cb) {
var env = { var env = {
root: config.taskPath || './tasks', root: config.taskPath || './tasks',