0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-18 02:21:47 -05:00
ghost/ghost
Simon Backx f4fdb4fa6c
Added new email event processor (#15879)
fixes https://github.com/TryGhost/Team/issues/2310

This moves the processing of the events from the event-processor to a
new email-event-processor in the email-service package.

- The `EmailEventProcessor` only translates events from
providerId/emailId to their known emailId, memberId and recipientId, and
dispatches the corresponding events.
- Since `EmailEventProcessor` runs in a separate worker thread, we can't
listen for the dispatched events on the main thread. To accomplish this
communication, the events dispatched from the `EmailEventProcessor`
class are 'posted' via the postMessage method and redispatched on the
main thread.
- A new `EmailEventStorage` class reacts to the email events and stores
it in the database. This code mostly corresponds to the (now deleted)
subclass of the old `EmailEventProcessor`
- Updating a members last_seen_at timestamp has moved to the
lastSeenAtUpdater.
- Email events no longer store `ObjectID` because these are not
encodable across threads via postMessage
- Includes new E2E tests that test the storage of all supported Mailgun
events. Note that in these tests we run the processing on the main
thread instead of on a separate thread (couldn't do this because
stubbing is not possible across threads)

There are some missing pieces that will get added in later PRs (this PR
focuses on porting the existing functionality):
- Handling temporary failures/bounces
- Capturing the error messages of bounce events
2022-11-29 11:15:19 +01:00
..
adapter-manager Update Test & linting packages 2022-11-07 20:39:48 +00:00
admin Merged v5.24.2 into main 2022-11-28 17:36:37 +00:00
api-framework Update Test & linting packages 2022-11-07 20:39:48 +00:00
api-version-compatibility-service Update Test & linting packages 2022-11-07 20:39:48 +00:00
audience-feedback Update dependency bson-objectid to v2.0.4 2022-11-24 11:24:07 +07:00
bootstrap-socket Update Test & linting packages 2022-11-07 20:39:48 +00:00
constants Update Test & linting packages 2022-11-07 20:39:48 +00:00
core Added new email event processor (#15879) 2022-11-29 11:15:19 +01:00
custom-theme-settings-service Update Test & linting packages 2022-11-07 20:39:48 +00:00
data-generator Update Test & linting packages 2022-11-07 20:39:48 +00:00
domain-events Added new email event processor (#15879) 2022-11-29 11:15:19 +01:00
email-analytics-provider-mailgun Update Test & linting packages 2022-11-07 20:39:48 +00:00
email-analytics-service Added new email event processor (#15879) 2022-11-29 11:15:19 +01:00
email-content-generator Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
email-events Added new email event processor (#15879) 2022-11-29 11:15:19 +01:00
email-service Added new email event processor (#15879) 2022-11-29 11:15:19 +01:00
email-suppression-list Fixed lint for @tryghost/email-suppression-list 2022-11-18 15:06:56 +07:00
express-dynamic-redirects Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
extract-api-key Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
html-to-plaintext Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
job-manager Added new email event processor (#15879) 2022-11-29 11:15:19 +01:00
link-redirects Update dependency bson-objectid to v2.0.4 2022-11-24 11:24:07 +07:00
link-replacer Update Test & linting packages 2022-11-07 20:39:48 +00:00
link-tracking Update dependency bson-objectid to v2.0.4 2022-11-24 11:24:07 +07:00
magic-link Update Test & linting packages 2022-11-07 20:39:48 +00:00
mailgun-client Update dependency mailgun.js to v8.0.6 2022-11-17 22:31:28 +00:00
member-attribution 🐛 Fixed ref attribute in email links (#15775) 2022-11-08 11:24:00 +01:00
member-events Update Test & linting packages 2022-11-07 20:39:48 +00:00
members-api Added events to Post Analytics page (#15886) 2022-11-28 17:43:35 +04:00
members-csv Update Test & linting packages 2022-11-07 20:39:48 +00:00
members-events-service Added new email event processor (#15879) 2022-11-29 11:15:19 +01:00
members-importer Fixed verification trigger not working for large imports (#15887) 2022-11-28 18:22:10 +01:00
members-ssr Update Test & linting packages 2022-11-07 20:39:48 +00:00
minifier Update dependency terser to v5.16.0 2022-11-24 19:01:01 +00:00
mw-api-version-mismatch Update Test & linting packages 2022-11-07 20:39:48 +00:00
mw-cache-control Update Test & linting packages 2022-11-07 20:39:48 +00:00
mw-error-handler Renamed mw-error-handler test file to match lib 2022-11-23 21:49:40 +00:00
mw-session-from-token Update Test & linting packages 2022-11-07 20:39:48 +00:00
mw-update-user-last-seen Update Test & linting packages 2022-11-07 20:39:48 +00:00
mw-vhost Update dependency supertest to v6.3.1 2022-10-26 02:54:43 +00:00
oembed-service Update metascraper to v5.32.1 2022-11-21 15:31:26 +00:00
offers Update dependency bson-objectid to v2.0.4 2022-11-24 11:24:07 +07:00
package-json Update Test & linting packages 2022-11-07 20:39:48 +00:00
payments Limited Stripe price lookups (#15823) 2022-11-17 14:33:46 +01:00
portal Add suppression modal to Portal 2022-11-24 13:58:27 +04:00
referrers Update Test & linting packages 2022-11-07 20:39:48 +00:00
security Update Test & linting packages 2022-11-07 20:39:48 +00:00
session-service Update Test & linting packages 2022-11-07 20:39:48 +00:00
settings-path-manager Update Test & linting packages 2022-11-07 20:39:48 +00:00
staff-service Added note on package/class naming 2022-11-22 11:25:11 +07:00
stats-service Update Test & linting packages 2022-11-07 20:39:48 +00:00
stripe Limited Stripe price lookups (#15823) 2022-11-17 14:33:46 +01:00
tiers Update dependency bson-objectid to v2.0.4 2022-11-24 11:24:07 +07:00
update-check-service Update Test & linting packages 2022-11-07 20:39:48 +00:00
verification-trigger Removed getCreatedEvents and added verification trigger test (#15832) 2022-11-18 15:05:15 +01:00
version-notifications-data-service Update Test & linting packages 2022-11-07 20:39:48 +00:00