mirror of https://github.com/xwiki-labs/cryptpad
Fix eviction error and add DRY_RUN to the archive cleaning script
This commit is contained in:
parent
70d84838df
commit
b22441446c
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue