Skip to content

Commit

Permalink
nix the "remove if empty auth & no more session" cron task
Browse files Browse the repository at this point in the history
  • Loading branch information
lefnire committed Apr 4, 2013
1 parent 85432ca commit 234d372
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions migrations/20130212_preen_cron.js
Original file line number Diff line number Diff line change
Expand Up @@ -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});
}
});
});*/

0 comments on commit 234d372

Please sign in to comment.