drop support for 'retainData' configuration

This commit is contained in:
ansuz
2020-01-23 15:13:19 -05:00
parent f45de2b52f
commit c388641479
7 changed files with 22 additions and 144 deletions

View File

@@ -83,7 +83,6 @@ module.exports.create = function (cfg) {
const rpc = cfg.rpc;
const tasks = cfg.tasks;
const store = cfg.store;
const retainData = cfg.retainData;
Log = cfg.log;
Log.silly('HK_LOADING', 'LOADING HISTORY_KEEPER MODULE');
@@ -350,18 +349,9 @@ module.exports.create = function (cfg) {
but for some reason are still present
*/
const expireChannel = function (ctx, channel) {
if (retainData) {
return void store.archiveChannel(channel, function (err) {
Log.info("ARCHIVAL_CHANNEL_BY_HISTORY_KEEPER_EXPIRATION", {
channelId: channel,
status: err? String(err): "SUCCESS",
});
});
}
store.removeChannel(channel, function (err) {
Log.info("DELETION_CHANNEL_BY_HISTORY_KEEPER_EXPIRATION", {
channelid: channel,
return void store.archiveChannel(channel, function (err) {
Log.info("ARCHIVAL_CHANNEL_BY_HISTORY_KEEPER_EXPIRATION", {
channelId: channel,
status: err? String(err): "SUCCESS",
});
});