remove some dead code
This commit is contained in:
parent
a21c3372c0
commit
b04133e6c3
1 changed files with 0 additions and 32 deletions
|
@ -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
|
/* channelBytes
|
||||||
calls back with an error or the size (in bytes) of a channel and its metadata
|
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));
|
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
|
// write to a log file
|
||||||
log: function (channelName, content, cb) {
|
log: function (channelName, content, cb) {
|
||||||
// you probably want the events in your log to be in the correct order.
|
// 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);*/
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue