This message was deleted.
# give-feedback
w
This message was deleted.
f
Thanks, I think we might be missing some indexes on that collection. So those un-indexed queries were doing full scans which get really expensive as the size grows. In addition to adding missing indexes, we should be able to add a cronjob to clean up those old jobs pretty easily.
a
my not-so-comfortable-with-node/typescript guess is that it's because
agenda.define
is used in the constructor of the `EventNotifier`: https://github.com/growthbook/growthbook/blob/1a9e129bfae401e62bde002fb4679b5dc9de956d/packages/back-end/src/events/notifiers/EventNotifier.ts#L[…]6 and in all usages of
perform()
a new EventNotifier is created
f
creating new docs for every event is the proper behavior since the event id is part of the unique key. We're just missing the cleanup part
a
got it, that makes sense
f
Added a GitHub issue to track this - https://github.com/growthbook/growthbook/issues/2116
🙏 1
139 Views