mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 11:40:25 +00:00
nix the "remove if empty auth & no more session" cron task
This commit is contained in:
parent
85432cabdc
commit
234d3725be
1 changed files with 6 additions and 2 deletions
|
|
@ -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});
|
||||
}
|
||||
});
|
||||
});*/
|
||||
Loading…
Reference in a new issue