From b04133e6c3e669dca4f337bc7fe470c8829ac08e Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 23 Jul 2020 09:28:00 -0400 Subject: [PATCH] remove some dead code --- lib/storage/file.js | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/lib/storage/file.js b/lib/storage/file.js index db7871ef0..c6506427d 100644 --- a/lib/storage/file.js +++ b/lib/storage/file.js @@ -671,29 +671,6 @@ var unarchiveChannel = function (env, channelName, cb) { })); }); }; -/* -var flushUnusedChannels = function (env, cb, frame) { - var currentTime = +new Date(); - - var expiration = typeof(frame) === 'undefined'? env.channelExpirationMs: frame; - Object.keys(env.channels).forEach(function (chanId) { - var chan = env.channels[chanId]; - if (typeof(chan.atime) !== 'number') { return; } - if (currentTime >= expiration + chan.atime) { - closeChannel(env, chanId, function (err) { - if (err) { - console.error(err); - return; - } - if (env.verbose) { - console.log("Closed channel [%s]", chanId); - } - }); - } - }); - cb(); -}; -*/ /* channelBytes calls back with an error or the size (in bytes) of a channel and its metadata @@ -1235,11 +1212,6 @@ module.exports.create = function (conf, _cb) { closeChannel(env, channelName, Util.both(cb, next)); }); }, - // iterate over open channels and close any that are not active - flushUnusedChannels: function (cb) { - cb("DEPRECATED"); - //flushUnusedChannels(env, cb); - }, // write to a log file log: function (channelName, content, cb) { // you probably want the events in your log to be in the correct order. @@ -1253,8 +1225,4 @@ module.exports.create = function (conf, _cb) { } }); }); - /* - it = setInterval(function () { - flushUnusedChannels(env, function () { }); - }, 5000);*/ };