remove some dead code

This commit is contained in:
ansuz 2020-07-23 09:28:00 -04:00
parent a21c3372c0
commit b04133e6c3

View file

@ -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);*/
};