From 234d3725be00830b0293a898c2e82a33523de0f9 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Thu, 4 Apr 2013 17:38:31 -0400 Subject: [PATCH] nix the "remove if empty auth & no more session" cron task --- migrations/20130212_preen_cron.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/migrations/20130212_preen_cron.js b/migrations/20130212_preen_cron.js index 17bfe9d2b1..fc45cc0f13 100644 --- a/migrations/20130212_preen_cron.js +++ b/migrations/20130212_preen_cron.js @@ -44,9 +44,13 @@ db.users.find(un_registered).forEach(function(user) { }); -db.sessions.find().forEach(function(sess){ +/** + * Don't remove missing user auths anymore. This was previously necessary due to data corruption, + * revisit if needs be + */ +/*db.sessions.find().forEach(function(sess){ var uid = JSON.parse(sess.session).userId; if (!uid || db.users.count({_id:uid}) === 0) { db.sessions.remove({_id:sess._id}); } -}); \ No newline at end of file +});*/ \ No newline at end of file