mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 11:54:33 +03:00
819d0d884c
fixes https://github.com/TryGhost/Team/issues/2366 refs https://ghost.slack.com/archives/C02G9E68C/p1670232405014209 Probem described in issue. In the old MEGA flow: - The `email_verification_required` check is now repeated inside the job In the new email service flow: - The `email_verification_required` is now checked (didn't happen before) - When generating the email batch recipients, we only include members that were created before the email was created. That way it is impossible to avoid limit checks by inserting new members between creating an email and sending an email. - We don't need to repeat the check inside the job because of the above changes Improved handling of large imports: - When checking `email_verification_required`, we now also check if the import threshold is reached (a new method is introduced in vertificationTrigger specifically for this usage). If it is, we start the verification progress. This is required for long running imports that only check the verification threshold at the very end. - This change increases the concurrency of fastq to 3 (refs https://ghost.slack.com/archives/C02G9E68C/p1670232405014209). So when running a long import, it is now possible to send emails without having to wait for the import. Above change makes sure it is not possible to get around the verification limits. Refactoring: - Removed the need to use `updateVerificationTrigger` by making thresholds getters instead of fixed variables. - Improved awaiting of members import job in regression test
30 lines
723 B
JSON
30 lines
723 B
JSON
{
|
|
"name": "@tryghost/verification-trigger",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"author": "Ghost Foundation",
|
|
"license": "MIT",
|
|
"main": "index.js",
|
|
"scripts": {
|
|
"dev": "echo \"Implement me!\"",
|
|
"test:unit": "NODE_ENV=testing c8 --all --check-coverage --100 --reporter text --reporter cobertura mocha './test/**/*.test.js'",
|
|
"test": "yarn test:unit",
|
|
"lint": "eslint . --ext .js --cache"
|
|
},
|
|
"files": [
|
|
"index.js",
|
|
"lib"
|
|
],
|
|
"devDependencies": {
|
|
"c8": "7.12.0",
|
|
"mocha": "10.2.0",
|
|
"should": "13.2.3",
|
|
"sinon": "14.0.2"
|
|
},
|
|
"dependencies": {
|
|
"@tryghost/domain-events": "0.0.0",
|
|
"@tryghost/errors": "1.2.20",
|
|
"@tryghost/member-events": "0.0.0"
|
|
}
|
|
}
|