mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-22 11:16:01 +03:00
88db66a74c
ref https://linear.app/tryghost/issue/ENG-1556/ - added background job queue behind config flags - when enabled, is only used for the member email analytics updates in order to speed up the parent job, and take load off of the main process that is serving requests The intent here is to decouple certain code paths from the main process where it is unnecessary, or worse, where it's part of the request. Primary use cases are email analytics (particularly the member stats [open rate]) which are not particularly helpful in the period immediately following an email send, while the click traffic and delivered/opened events are. Related, the email link clicks themselves send off a cascade of events that are quite a burden on the main process currently and are somewhat tied to the request response when they needn't be. We'll be looking to tackle that after some initial testing with the email analytics job. |
||
---|---|---|
.. | ||
lib | ||
test | ||
.eslintrc.js | ||
index.js | ||
package.json | ||
README.md |
Member Events
Usage
const {MemberEntryViewEvent} = require('@tryghost/member-events');
const event = MemberEntryViewEvent.create({
memberId: member.id,
memberStatus: member.status,
entryId: post.id,
entryUrl: post.url
});
const DomainEvents = require('@tryghost/domain-events');
DomainEvents.dispatch(event);