0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Reduced the amount of events Collections listens on

refs https://github.com/TryGhost/Team/issues/3169

- When a not yet mapped event is produced by Ghost model the posts belonging to a collection are recalculated in a brute-force way. This causes a lot of strain on the database and times out some of the tests. Right now we only care about a handful of events, so limited the ones we listen to and will be uncommenting the rest when we have an optimal mapping/handling for them.
This commit is contained in:
Naz 2023-06-23 17:32:09 +07:00 committed by naz
parent f74588f9c2
commit 1fb8fb9bd5

View file

@ -34,17 +34,17 @@ const translateModelEventsToDomainEvents = () => {
'post.deleted', 'post.deleted',
'post.edited', 'post.edited',
'tag.added', // 'tag.added',
'tag.edited', // 'tag.edited',
'tag.attached', // 'tag.attached',
'tag.detached', // 'tag.detached',
'tag.deleted', // 'tag.deleted',
'user.activated', // 'user.activated',
'user.activated.edited', 'user.activated.edited'
'user.attached', // 'user.attached',
'user.detached', // 'user.detached',
'user.deleted' // 'user.deleted'
]; ];
for (const modelEvent of ghostModelUpdateEvents) { for (const modelEvent of ghostModelUpdateEvents) {