Improve wekan performance (checklist collection scan)

This commit is contained in:
Alexis LACROIX 2017-02-22 15:03:33 +01:00 committed by Lauri Ojansivu
parent cd6317cedb
commit 6ca832c02b
2 changed files with 5 additions and 3 deletions

View file

@ -133,6 +133,10 @@ Checklists.mutations({
});
if (Meteor.isServer) {
Meteor.startup(() => {
Checklists._collection._ensureIndex({ cardId: 1, createdAt: 1 });
});
Checklists.after.insert((userId, doc) => {
Activities.insert({
userId,