diff --git a/lib/eviction.js b/lib/eviction.js index 42afbc2c5..12aaeff0f 100644 --- a/lib/eviction.js +++ b/lib/eviction.js @@ -203,7 +203,7 @@ var evictArchived = function (Env, cb) { if (Env.DRY_RUN) { if (item.channel.length === 32) { removed++; } else if (item.channel.length === 44) { accounts++; } - return void Log.info("EVICT_ARCHIVED_CHANNEL_DRY_RUN", item.channel, next); + return void Log.info("EVICT_ARCHIVED_CHANNEL_DRY_RUN", item.channel, cb); } store.removeArchivedChannel(item.channel, w(function (err) { if (err) { diff --git a/scripts/evict-archived.js b/scripts/evict-archived.js index 124ebc30c..6914c90ad 100644 --- a/scripts/evict-archived.js +++ b/scripts/evict-archived.js @@ -15,6 +15,10 @@ var config = require("../lib/load-config"); var Env = Environment.create(config); +// Set DRY_RUN to true to run the script without deleting anything. A log file +// will be created. +Env.DRY_RUN = false; + var loadPremiumAccounts = function (Env, cb) { nThen(function (w) { // load premium accounts